ID: 44954 Updated by: [email protected] Reported By: abakker at gmx dot net Status: Open Bug Type: Reproducible crash -Operating System: Win XP +Operating System: win32 only - Win XP -PHP Version: 5.2.6 +PHP Version: 5.2.8 Assigned To: fb-req-jani New Comment:
I can not reproduce this on real OS. Assuming it's win32 only issue. Previous Comments: ------------------------------------------------------------------------ [2009-01-20 08:23:26] abakker at gmx dot net I completely removed Apache and PHP from my PC and did a fresh default install of Apache 2.2.11 and PHP 5.2.8 (on my PC with Windows XP Pro). The problem still occurs. After 202 iterations of file_get_contents the script continues very slowly, every iteration takes 1 minute. In the Apache error log file the following entries are created: [Tue Jan 20 09:09:17 2009] [error] [client 127.0.0.1] PHP Warning: file_get_contents(http://localhost/bugs/bug.htm) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.\r\n in C:\\Andre\\Apache\\public_html\\bugs\\bug.php on line 7 [Tue Jan 20 09:10:17 2009] [error] [client 127.0.0.1] PHP Warning: file_get_contents(http://localhost/bugs/bug.htm) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.\r\n in C:\\Andre\\Apache\\public_html\\bugs\\bug.php on line 7 [Tue Jan 20 09:11:17 2009] [error] [client 127.0.0.1] PHP Warning: file_get_contents(http://localhost/bugs/bug.htm) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.\r\n in C:\\Andre\\Apache\\public_html\\bugs\\bug.php on line 7 Apache does not respond to page requests in other sessions, i.e. other users cannot access web pages anymore. I guess technically speaking Apache does not crash, but hangs. Maybe that is why I am unable to create a backtrace. Anyway, the problem occurs with a default install of Apache and PHP. Maybe you are able to reproduce the problem if you do a default install on your PC. ------------------------------------------------------------------------ [2008-08-07 22:15:17] [email protected] The problem is that I can't reproduce this. So it's up to you either provide the backtrace or just let this report rot. ------------------------------------------------------------------------ [2008-07-24 09:10:43] abakker at gmx dot net I tried to create a backtrace for the httpd.exe process, but no dmp file is generated. Either Apache does not crash (but hangs) or I am doing something wrong. The problem can easily be reproduced (just run the script I provided). I suggest you reproduce the problem yourself which allows you to do whatever analysis or backtracing you need. That would be far more efficient than passing it back to me. ------------------------------------------------------------------------ [2008-07-14 21:13:40] [email protected] Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. ------------------------------------------------------------------------ [2008-05-18 08:43:37] abakker at gmx dot net I added a sleep(1) and set max_execution_time to 999. After 172 iterations the Apache server hangs (does not respond to page requests anymore). The script continues very slowly at this point, it times out on every file_get_contents request (in the error log you see the error message mentioned at the top of this bug report for every iteration). The total number of threads in Windows Task Manager does not increase when running the script. My system is also not running out of resources, I have 3 Gb memory of which 2.6 Gb is available. When you replace file_get_contents with http_get or curl_exec the problem does not occur. Seems to me that this indicates that there is something wrong with file_get_contents. In any case a PHP script should not cause the Apache server to hang/crash (Apache does not respond to page requests for any user anymore) and bring a production system down. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/44954 -- Edit this bug report at http://bugs.php.net/?id=44954&edit=1
