From:             Alex at phpguide dot co dot il
Operating system: Ubuntu 12.04 x64
PHP version:      5.4.8
Package:          FPM related
Bug Type:         Bug
Bug description:Spawned processes do not perform

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 bug report at https://bugs.php.net/bug.php?id=63395&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=63395&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=63395&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=63395&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=63395&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=63395&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=63395&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=63395&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=63395&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=63395&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=63395&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=63395&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=63395&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=63395&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63395&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=63395&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=63395&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=63395&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63395&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=63395&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=63395&r=mysqlcfg

Reply via email to