php-fpm + nginx = pstream sent invalid status "40"

explosive

Verified User
Joined
Dec 29, 2010
Messages
181
Location
PL/EU
PHP-FPM via fastcgi
PHP 5.4
NGINX
XCache 3.0
soft: Invision Power Board, IPB

Sometimes (not always!) user can't send PM, in nginx.log that looks like:

[error] 10579#0: *3696988 upstream sent invalid status "40" while reading response header from upstream, client: 80.*, server: server.com
, request: "GET /index.php?app=members&module=messaging&section=send&do=form&fromMemberID=34528 HTTP/1.1", upstream: "fastcgi://unix:/tmp/php5-fpm.sock:"

in php-fpm.log are nothing about it :/

In google: nothing (except one entry but with no solution) about "status 40".

Anyone?
 
I found answer on posting on serverfault.com forum - click here to check

The answer is:

request_terminate_timeout=30s
in php-fpm config.

Note, you can use values other than 30s also.

I used it to match my value in main php.ini file which is:

max_execution_time = 30
 
Back
Top