Welcome! Log In Create A New Profile

Advanced

fastcgi_keep_conn + PHP-FPM

Steffen Weber
February 06, 2013 05:02AM
The changelog of nginx 1.3.12 mentions a bugfix in the "fastcgi_keep_conn"
directive. Therefore I decided to give this feature a try.

Snippet from nginx.conf:

fastcgi_keep_conn on;

upstream php {
server 127.0.0.1:9000;
keepalive 6;
}

Snippet from php-fpm.conf:

listen = 127.0.0.1:9000
pm = static
pm.max_children = 4
pm.max_requests = 5 # very low for demo purpose

Now I run the following command:

while true; do wget http://localhost/test.php -O- > /dev/null; done

After 5 requests (pm.max_requests = 5) wget hangs and nginx logs the
following error:

2013/02/06 10:47:09 [error] 6795#0: *6 readv() failed (104: Connection
reset by peer) while reading upstream, client: ::ffff:127.0.0.1, server:
localhost, request: "GET /test.php HTTP/1.1", upstream: "fastcgi://
127.0.0.1:9000", host: "localhost"

It seems that nginx cannot cope with a restarting php-fpm process. Anything
I can do?

Thanks,
Steffen
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

fastcgi_keep_conn + PHP-FPM

Steffen Weber February 06, 2013 05:02AM

Re: fastcgi_keep_conn + PHP-FPM

Maxim Dounin February 06, 2013 11:24AM

Re: fastcgi_keep_conn + PHP-FPM

Steffen Weber February 08, 2013 11:50AM

Re: fastcgi_keep_conn + PHP-FPM

Patrick Lists February 09, 2013 03:56AM

Re: fastcgi_keep_conn + PHP-FPM

Steffen Weber February 10, 2013 07:30AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 252
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready