Project

General

Profile

lighttpd 1.4.28 and php-fpm 5.5 time out and 500 error.

Added by MetaYii over 10 years ago

I have a lighttpd server (1.4.28) configured to connect to php-fpm (5.5) on the same box, at 127.0.0.1:9000. I've configured PHP's max_execution_time at 1200 and PHP-FPM timeout at 1800 (a bit high, but just testing), because I run heavy reporting (5+ minutes per report).

My problem is that, despite those high timeouts, all what I get when I run a heavy report is a 500 error. Checking lighttpd logs, I can see that it complains about PHP-FPM, saying that it didn't received data. So I guess lighttpd is not waiting for PHP-FPM to end. How can this be avoided?


Replies (2)

RE: lighttpd 1.4.28 and php-fpm 5.5 time out and 500 error. - Added by MetaYii over 10 years ago

The error message:

2013-08-15 19:49:05: (mod_fastcgi.c.2568) unexpected end-of-file (perhaps the fastcgi process died): pid: 0 socket: tcp:127.0.0.1:9000
2013-08-15 19:49:05: (mod_fastcgi.c.3356) response not received, request sent: 3145 on socket: tcp:127.0.0.1:9000 for /, closing connection

exactly 2 minutes after the request started.

RE: lighttpd 1.4.28 and php-fpm 5.5 time out and 500 error. - Added by MetaYii over 10 years ago

Fixed by setting PHP-FPM's request_terminate_timeout=0

    (1-2/2)