On a setup using nginx
with PHP-FPM v5.3.3
, I noticed the following errors occurring frequently in the nginx' errors log:
Feb 16 15:00:22 mymachine www.example.com 2015/02/16 15:00:20 [error] 20254#0:
*1448249 readv() failed (104: Connection reset by peer) while reading upstream
[...]
Looking at the php-fpm.log
file, I noticed the following:
[16-Feb-2015 15:00:20] NOTICE: [pool www] child 22279 exited with code 0 after
47983.681002 seconds from start
[16-Feb-2015 15:00:20] NOTICE: [pool www] child 10625 started
That is worker recycling as the pm.max_requests
configuration directive sets.
I (reasonably) assumed PHP-FPM would courrectly process any accepted connection/request before recycling the worker, as this task does not imply any kind of emergency.
- Is it a misconfiguration?
- Is it a flaw of PHP-FPM 5.3.3?
- Is it a flaw of all version of PHP-FPM?