#23274 [Fbk->Opn]: php starts using 99% of CPU when script is aborted
| From: | spagmoid at yahoo dot com | Date: | Sat, 19 Apr 2003 04:14:13 +0000 |
| Subject: | #23274 [Fbk->Opn]: php starts using 99% of CPU when script is aborted | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-37892@lists.php.net to get a copy of this message | ||
ID: 23274
User updated by: spagmoid at yahoo dot com
Reported By: spagmoid at yahoo dot com
-Status: Feedback
+Status: Open
Bug Type: *General Issues
Operating System: WinXP
PHP Version: 4.3.1
New Comment:
OK this seems to be fixed in that snapshot.
This snapshot is showing all headers at the top of every page. Is that
on purpose, and is there any way to turn that on in the release
versions for testing?
Previous Comments:
------------------------------------------------------------------------
[2003-04-18 16:56:15] magnus@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2003-04-18 16:48:48] spagmoid at yahoo dot com
OK confirming, this has nothing to do with connection_status(),
although that isn't working either.
Take this code:
ignore_user_abort(true);
set_time_limit(0);
while(connection_status()==0)
{
echo str_pad(" ", 3000);
flush();
sleep(1);
}
After aborting or closing the browser, the PHP process suddenly starts
using 99% CPU. It takes a few seconds to kick in, as if it's something
to do with the output buffer. If you replace the while line to
while(1) it does the same thing. 99% of CPU for no reason.
------------------------------------------------------------------------
[2003-04-18 15:01:40] spagmoid at yahoo dot com
Using ignore_user_abort(true) and set_time_limit(0)
So the only way to abort the script is:
if(connection_status()!=0) die();
Well the script is using 1% of the CPU until I hit abort, then it jumps
up to 99% and WILL NOT DIE. Effectively killing the server. I don't
know if connection_status() is working or not, but if its not the
script should just continue using 1% of the CPU. So what's the
problem?
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23274&edit=1