Thursday, January 12, 2012

upstream timed out while reading response header from upstream

SkyHi @ Thursday, January 12, 2012
Testing mcrypt library in PHP, this error occurs:

#sudo tail -100 /var/log/php5-fpm.log
Jan 04 12:17:14.425241 [WARNING] [pool www] child 28983 exited with code 2 after 1.756421 seconds from start

Jan 04 12:17:14.431710 [NOTICE] [pool www] child 28997 started

#tail /var/log/nginx/error.php
2012/01/12 11:33:25 [error] 29037#0: *6042 upstream timed out (110: Connection timed out) while reading response header from upstream, client:  192.168.218.238, server: localhost, request: "GET /murach2/ch21/encrypt.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.218.238"


you have too many connections and FPM is not able to handle
everything. You can play with backlog, max_client and timeouts.
#vi /etc/php5/fpm/pool.d/www.conf

REFERENCES