Edit report at https://bugs.php.net/bug.php?id=63395&edit=1
ID: 63395 Comment by: php-bugs at puzzled dot xs4all dot nl Reported by: Alex at phpguide dot co dot il Summary: Spawned processes do not perform Status: Open Type: Bug Package: FPM related Operating System: Ubuntu 12.04 x64 PHP Version: 5.4.8 Block user comment: N Private report: N New Comment: This bug seems similar to https://bugs.php.net/bug.php?id=60961 Previous Comments: ------------------------------------------------------------------------ [2012-10-30 10:20:30] Alex at phpguide dot co dot il Description: ------------ I'm running nginx 1.2.4 with php5-fpm (5.4.8) issuing ab -n 20000 -c 1000 http://localhost/index.php When pm = dynamic pm.max_children = 3000 pm.start_servers = 100 <- this is important pm.max_spare_servers = 1000 I'm having a lot of errors in nginx talking to php [error] 26125#0: *49177 upstream prematurely closed connection while reading response header from upstream, ... "fastcgi://127.0.0.1:9000" [error] 26125#0: *56030 recv() failed (104: Connection reset by peer) while reading response header from upstream, ... upstream: "fastcgi://127.0.0.1:9000" The fpm log shows a lot of WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and X total children When spawning new children reaches a concrete amount nginx stops issuing such errors. This leads me to believe freshly spawned processes do not execute and respond correctly. Now, when I start with 3000 children straight ahead, all connections work properly. No errors in nginx or fpm. pm = dynamic pm.max_children = 3000 pm.start_servers = 3000 <- Straight ahead pm.max_spare_servers = 3000 Test script: --------------- The php code on the server is relatively simple. apc_inc('count111'); sleep(1); echo 'x'; ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=63395&edit=1