2 PHP 4.2.2 issues: server keeps working after client disconnects, session_start() blocks until other session scripts complete
| From: | Michael Kedl | Date: | Wed, 05 Mar 2003 20:49:03 +0000 |
| Subject: | 2 PHP 4.2.2 issues: server keeps working after client disconnects, session_start() blocks until other session scripts complete | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-138358@lists.php.net to get a copy of this message | ||
Hello all, I have 2 questions that have come up because I have several
long reports that can take 1-2 minutes to run. These are run from any
web client thru our linux -> apache -> php -> mysql system.
1)server keeps working after client disconnects
If a php script is running and it may take 1-3 minutes, and I hit escape
or close my web browser window, the script keeps running. I can see it
in top, consuming lots of cpu and sometimes ram. Why doesn't apache and
the php4.so notice the closed tcp connection and abort the script? Is
there a way to make this happen?
2)session_start() blocks until other session scripts complete
Related to #1 above, if I have a script that uses session_start() or
session_register() running, for say 1-3 minutes, and I try to open
another connection to the same server to a script that uses
session_start() or session_register() the 2nd connection is blocked
until the first script finishes! This seems very bad. How can I get
around this? I have tested and found that serving other php/mysql
scripts from the same server work fine as long as no session_start() or
session_register() like commands are present. I didn't seen this
anywhere on the PHP website or docs.
Can anyone help? Thanks!
Mike
--
Michael Kedl <kedlm@knology.net>