Welcome! Log In Create A New Profile

Advanced

Send 502 when all php-fpm workers are in use

July 05, 2014 10:47PM
I have a php-fpm pool of workers which is 6. There are long running requests being sent, so I have the following fastcgi directives set:

fastcgi_connect_timeout 15;
fastcgi_send_timeout 1200;
fastcgi_read_timeout 1200;

However right now, if the php-fpm pool of workers is full, a request waits the full 20 minutes. I'd like requests to fail with a 502 status code if the php-fpm pool of workers is full instead. This change should still allow long running requests (max 20 minutes) though. I would have thought if the php-fpm pool workers are all being used, a request would timeout in 15 seconds according to fastcgi_connect_timeout, but this does not seem to be the case.

Thanks for the help.
Subject Author Posted

Send 502 when all php-fpm workers are in use

justink101 July 05, 2014 10:47PM

Re: Send 502 when all php-fpm workers are in use

Maxim Dounin July 06, 2014 07:22AM

Re: Send 502 when all php-fpm workers are in use

justink101 July 06, 2014 10:14PM

Re: Send 502 when all php-fpm workers are in use

Maxim Dounin July 07, 2014 07:58AM

Re: Send 502 when all php-fpm workers are in use

justink101 July 07, 2014 08:55PM

Re: Send 502 when all php-fpm workers are in use

itpp2012 July 06, 2014 08:06AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 367
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready