httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BAO RuiXian <>
Subject Re: send body timed out
Date Thu, 24 Jan 2002 23:41:39 GMT
Hello, Joshua,

> "long_process" means the stuff that you want to keep going after the main
> page has been delivered to the client.  This is the stuff that is doing your
> long calcualtions.  If you don't put it in background and close the file
> descriptors, it will get killed when the client finishes getting the rest of
> the page.

Actually, my program has many 'long processes'. There is a loop in the program,
and each loop will try to execute one SQL sentence. Before finishing execution
of each sentence, I don't want to process futher, for I want to get the result
to the page (now of course to a separate file.). Obviously, the strategy in the
following is not quite suiting my needs. I have read quite some disccution from
some related newsgroups (that is also why I response to your message a little
bit later), and have got some ideas.

Basically, I fork a child process each time in a loop for excuting the current
SQL sentence, like $sth->execute(), and let the parent process to wait for the
child process to finish before further going down. This runs pretty well, I
don't use exit(0) command at the end of each child process though (Don't know if
this is a problem or not later). I did one test, and it took about 24 hours to
get the whole thing done with being destroyed, even there appeared some other
processes in the middle of execution like the backup process of the database
itself at night, etc.

> long_process < /dev/null > /dev/null 2>&1 &

Actually, before your this message, I tried the following command

    $sth->execute()< /dev/null > /dev/null 2>&1 &

And not working, giving syntax error, then I tried to use double quotes to quote
them, and eval to include them, but nothing happended in the database.

Thank you very much for your great help and will let you know if I have further


BAO RuiXian, PROGRAMMER, Technologies Team,  Project Services Group
AtBusiness Communications Corp., Kaapeliaukio 1, FIN-00210 Helsinki
tel. +358-9-2311 6674, mob. +358-50-329 6275,  fax +358-9-2311 6601, email:

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message