|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2003-04-18 15:01 UTC] 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? PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 13 07:00:01 2025 UTC |
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.