Bug #369
closedlighttpd hanging under high fastcgi load...
Description
Lighttpd begins to consume 100% of the CPU and never processes any requests. It looks like lighttpd has a problem when it can't connect to the fastcgi socket. Thoughts/patches? grin -sc
30065 lighttpd CALL fcntl(0x192,0x2,0x1) 30065 lighttpd RET fcntl 0 30065 lighttpd CALL fcntl(0x192,0x4,0x6) 30065 lighttpd RET fcntl 0 30065 lighttpd CALL connect(0x192,0x7fffffffe690,0x19) 30065 lighttpd NAMI "/tmp/php-devel.socket-0" 30065 lighttpd RET connect -1 errno 61 Connection refused 30065 lighttpd CALL write(0x5,0x82c980,0x6f) 30065 lighttpd GIO fd 5 wrote 111 bytes "2005-11-12 19:43:43: (mod_fastcgi.c.1531) connect failed: 402 Connection refused 61 0 /tmp/php-devel.socke\ t-0 " 30065 lighttpd RET write 111/0x6f 30065 lighttpd CALL wait4(0x7572,0x7fffffffe5d4,0x1,0) 30065 lighttpd RET wait4 0 30065 lighttpd CALL close(0x192) 30065 lighttpd RET close 0 30065 lighttpd NAMI "/www/devel/devel.host.com/public/ads/advert/index.php" 30065 lighttpd RET open 402/0x192 30065 lighttpd CALL close(0x192) 30065 lighttpd RET close 0 30065 lighttpd CALL socket(0x1,0x1,0) 30065 lighttpd RET socket 402/0x192 30065 lighttpd CALL fcntl(0x192,0x2,0x1) 30065 lighttpd RET fcntl 0 30065 lighttpd CALL fcntl(0x192,0x4,0x6) 30065 lighttpd RET fcntl 0 30065 lighttpd CALL connect(0x192,0x7fffffffe690,0x19) 30065 lighttpd NAMI "/tmp/php-devel.socket-0" 30065 lighttpd RET connect -1 errno 61 Connection refused 30065 lighttpd CALL write(0x5,0x82c980,0x6f) 30065 lighttpd GIO fd 5 wrote 111 bytes "2005-11-12 19:43:43: (mod_fastcgi.c.1531) connect failed: 402 Connection refused 61 0 /tmp/php-devel.socke\ t-0 " 30065 lighttpd RET write 111/0x6f 30065 lighttpd CALL wait4(0x7572,0x7fffffffe5d4,0x1,0) 30065 lighttpd RET wait4 0 30065 lighttpd CALL close(0x192) 30065 lighttpd RET close 0 30065 lighttpd CALL accept(0x4,0x7fffffffec90,0x7fffffffec8c) 30065 lighttpd RET accept 402/0x192 30065 lighttpd CALL fcntl(0x192,0x2,0x1) 30065 lighttpd RET fcntl 0 30065 lighttpd CALL fcntl(0x192,0x4,0x6) 30065 lighttpd RET fcntl 0 30065 lighttpd CALL ioctl(0x192,FIONREAD,0x7fffffffe80c) 30065 lighttpd RET ioctl 0 30065 lighttpd CALL read(0x192,0x82e000,0x103f) 30065 lighttpd GIO fd 402 read 112 bytes "GET /ads/advert/index.php HTTP/1.0\r User-Agent: ApacheBench/1.3d\r Host: www.host.com:81\r Accept: */*\r \r " 30065 lighttpd RET read 112/0x70 30065 lighttpd CALL stat(0x82dc00,0x7fffffffe6d0) 30065 lighttpd NAMI "/www/devel/devel.host.com/public/ads/advert/index.php" 30065 lighttpd RET stat 0 30065 lighttpd CALL open(0x82dc00,0,0) 30065 lighttpd NAMI "/www/devel/devel.host.com/public/ads/advert/index.php" 30065 lighttpd RET open 403/0x193 30065 lighttpd CALL close(0x193) 30065 lighttpd RET close 0 30065 lighttpd CALL stat(0x82dc00,0x7fffffffe610) 30065 lighttpd NAMI "/www/devel/devel.host.com/public/ads/advert/index.php" 30065 lighttpd RET stat 0 30065 lighttpd CALL open(0x82dc00,0,0) 30065 lighttpd NAMI "/www/devel/devel.host.com/public/ads/advert/index.php" 30065 lighttpd RET open 403/0x193 30065 lighttpd CALL close(0x193) 30065 lighttpd RET close 0 30065 lighttpd CALL stat(0x82dc00,0x7fffffffe630) 30065 lighttpd NAMI "/www/devel/devel.host.com/public/ads/advert/index.php" 30065 lighttpd RET stat 0 30065 lighttpd CALL open(0x82dc00,0,0) 30065 lighttpd NAMI "/www/devel/devel.host.com/public/ads/advert/index.php" 30065 lighttpd RET open 403/0x193 30065 lighttpd CALL close(0x193) 30065 lighttpd RET close 0 30065 lighttpd CALL socket(0x1,0x1,0) 30065 lighttpd RET socket 403/0x193 30065 lighttpd CALL fcntl(0x193,0x2,0x1) 30065 lighttpd RET fcntl 0 30065 lighttpd CALL fcntl(0x193,0x4,0x6) 30065 lighttpd RET fcntl 0 30065 lighttpd CALL wait4(0x7572,0x7fffffffe5d4,0x1,0) 30065 lighttpd RET wait4 0 30065 lighttpd CALL close(0x193) 30065 lighttpd RET close 0 30065 lighttpd CALL accept(0x4,0x7fffffffec90,0x7fffffffec8c) 30065 lighttpd RET accept 403/0x193 30065 lighttpd CALL fcntl(0x193,0x2,0x1) 30065 lighttpd RET fcntl 0 30065 lighttpd CALL fcntl(0x193,0x4,0x6) 30065 lighttpd RET fcntl 0 30065 lighttpd CALL break(0x832000) 30065 lighttpd RET break 0 30065 lighttpd CALL ioctl(0x193,FIONREAD,0x7fffffffe80c) 30065 lighttpd RET ioctl 0 30065 lighttpd CALL read(0x193,0x830000,0x103f) 30065 lighttpd GIO fd 403 read 112 bytes "GET /ads/advert/index.php HTTP/1.0\r User-Agent: ApacheBench/1.3d\r Host: www.host.com:81\r Accept: */*\r \r " 30065 lighttpd RET read 112/0x70 30065 lighttpd CALL stat(0x82f280,0x7fffffffe6d0) 30065 lighttpd NAMI "/www/devel/devel.host.com/public/ads/advert/index.php" 30065 lighttpd RET stat 0 30065 lighttpd CALL open(0x82f280,0,0) 30065 lighttpd NAMI "/www/devel/devel.host.com/public/ads/advert/index.php" 30065 lighttpd RET open 404/0x194 30065 lighttpd CALL close(0x194) 30065 lighttpd RET close 0 30065 lighttpd CALL stat(0x82f280,0x7fffffffe610) 30065 lighttpd NAMI "/www/devel/devel.host.com/public/ads/advert/index.php" 30065 lighttpd RET stat 0 30065 lighttpd CALL open(0x82f280,0,0) 30065 lighttpd NAMI "/www/devel/devel.host.com/public/ads/advert/index.php" 30065 lighttpd RET open 404/0x194 30065 lighttpd CALL close(0x194) 30065 lighttpd RET close 0 30065 lighttpd CALL stat(0x82f280,0x7fffffffe630) 30065 lighttpd NAMI "/www/devel/devel.host.com/public/ads/advert/index.php" 30065 lighttpd RET stat 0 30065 lighttpd CALL open(0x82f280,0,0) 30065 lighttpd NAMI "/www/devel/devel.host.com/public/ads/advert/index.php" 30065 lighttpd RET open 404/0x194 30065 lighttpd CALL close(0x194) 30065 lighttpd RET close 0 30065 lighttpd CALL socket(0x1,0x1,0) 30065 lighttpd RET socket 404/0x194 30065 lighttpd CALL fcntl(0x194,0x2,0x1) 30065 lighttpd RET fcntl 0 30065 lighttpd CALL fcntl(0x194,0x4,0x6) 30065 lighttpd RET fcntl 0 30065 lighttpd CALL wait4(0x7572,0x7fffffffe5d4,0x1,0) 30065 lighttpd RET wait4 0 30065 lighttpd CALL close(0x194) 30065 lighttpd RET close 0
-- sean
Updated by Anonymous over 19 years ago
Yes, something similar happened when I tried uploading and importing a .sql file (or by pasting it into a form field). The fcgi process that was handling it (a php process) hung, but further requests were not serviced until that specific fcgi process was killed (or lighttpd was restarted). Doh.
-- slakr
Updated by Anonymous over 19 years ago
I'm getting the same problem. slakr, is it possible to identify hung php fcgi processes? A quick cronjob to kill 09 them could possibly be a good workaround.
-- dave
Updated by Anonymous over 19 years ago
A suggestion by someone in #lighttpd: REDUCE the number of fcgi procs and fcgi children. I have it set to 2 max procs and 4 max fcgi children and have had no crashes/load spikes yet.
-- dave
Updated by Anonymous over 19 years ago
Some testing reveals that the bug seems to be to do with how many fcgi processes per fcgi section, rather than just the total number running.
-- dave
Updated by jan about 19 years ago
- Status changed from New to Fixed
- Resolution set to fixed
THis is fixed in the pre-release of 1.4.9 again. It was a problem for 1.4.8.
Also available in: Atom