ID: 45254 Comment by: ruanchunping at gmail dot com Reported By: yurtesen at ispro dot net Status: Open Bug Type: CGI related Operating System: FreeBSD 6.3 PHP Version: 5.2.6 New Comment:
I use lighttpd1.4.19 + php-cgi (5.2.6) @ FreeBSD 7.0 amd64 I found that ,the *POST* request sometimes hangs for ever, the lighttpd status report: ------------ handle-req 59339(time) handle-req 58478 handle-req 57985 ...... ------------ there are over 100 php-cgi processes in this status pre day. i have to restart lighttpd every day. these POST request are posting blog or uploading photos. Previous Comments: ------------------------------------------------------------------------ [2008-06-12 22:44:19] yurtesen at ispro dot net Description: ------------ When apache worker mpm and fastcgi and php-cgi are used together, the php-cgi processes sometimes hang and do not exit ever. I tried to backtrace the running process using 'gdb -q -p' [Switching to LWP 100164] 0x28affbe9 in accept () from /lib/libc.so.6 (gdb) backtrace #0 0x28affbe9 in accept () from /lib/libc.so.6 #1 0x28a4193a in accept () from /lib/libpthread.so.2 #2 0x082da06f in fcgi_accept_request () #3 0x082dc345 in main () (gdb) It looks like once PHP enters to function to accept request, it never exits unless instructed to do so. These processes wait idle for hours and when I find them I have to kill them manually. Reproduce code: --------------- Setup apache worker mpm, fastcgi, and php to work together. Load it up with requests and restart/reload server or cancel the requests in the middle (I dont exactly know what is causing this but these are the most probable suspects in my opinion). Sometimes apache process quits without transfering any data to PHP (perhaps browser canceled, server reload/restart etc.) PHP processes stay waiting... The problem does not exist when apache prefork mpm is used... Expected result: ---------------- I expect that PHP would die after max_input_time passses... Actual result: -------------- PHP hangs and waits until killed manually... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45254&edit=1
