Re: FastCGI KeepAlive

2017-06-22 Thread Maxim Dounin
Hello! On Thu, Jun 22, 2017 at 10:23:01AM -0400, Olaf van der Spek wrote: > Does nginx use / depend on FCGI_GET_VALUES? No, it doesn't. -- Maxim Dounin http://nginx.org/ ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo

Re: FastCGI KeepAlive

2017-06-22 Thread Olaf van der Spek
Does nginx use / depend on FCGI_GET_VALUES? Posted at Nginx Forum: https://forum.nginx.org/read.php?2,275028,275069#msg-275069 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

Re: FastCGI KeepAlive

2017-06-22 Thread Olaf van der Spek
Thanks! I'll see if I can post the full response. The implementation is custom indeed, but I am sending FCGI_END_REQUEST. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,275028,275067#msg-275067 ___ nginx mailing list nginx@nginx.org http://

Re: FastCGI KeepAlive

2017-06-22 Thread Maxim Dounin
Hello! On Thu, Jun 22, 2017 at 06:00:16AM -0400, Olaf van der Spek wrote: > Note the connect(13, ...) and close(13) right after the response has been > received. > For PHP it's working, but AFAIK there's nothing in the FastCGI protocol that > the backend has to do other then keeping the connecti

Re: FastCGI KeepAlive

2017-06-22 Thread Olaf van der Spek
Note the connect(13, ...) and close(13) right after the response has been received. For PHP it's working, but AFAIK there's nothing in the FastCGI protocol that the backend has to do other then keeping the connection open. gettimeofday({tv_sec=1498125120, tv_usec=540583}, NULL) = 0 recvfrom(3, "G

Re: FastCGI KeepAlive

2017-06-21 Thread Francis Daly
On Wed, Jun 21, 2017 at 03:48:22PM -0400, Olaf van der Spek wrote: Hi there, > > proxy_pass http://backend; > > Is this an error in the docs? I think the http:// here isn't right. proxy_pass can speak http or https. The config above is the way you tell it which one to speak to this backend/upst

Re: FastCGI KeepAlive

2017-06-21 Thread Olaf van der Spek
> proxy_pass http://backend; Is this an error in the docs? I think the http:// here isn't right. http://nginx.org/en/docs/http/ngx_http_upstream_module.html Posted at Nginx Forum: https://forum.nginx.org/read.php?2,275028,275038#msg-275038 ___ nginx

Re: FastCGI KeepAlive

2017-06-21 Thread Olaf van der Spek
This is what I've got: upstream backend { server unix:/tmp/backend.socket; keepalive 99; } location /v2 { include fastcgi.conf; fastcgi_keep_conn on; # fastcgi_pass unix:/tmp/backend.socket; fastcgi_pass backend; } I checked with strace and it appeared to clo

Re: FastCGI KeepAlive

2017-06-21 Thread Maxim Dounin
request. With FastCGI, keepalive directive in the upstream{} block and fastcgi_keep_conn in the location with fastcgi_pass should be enough. Detailed example can be found in the documentation, http://nginx.org/en/docs/http/ngx_http_upstream_module.html#keepalive. If it doesn't work for you,

FastCGI KeepAlive

2017-06-21 Thread Olaf van der Spek
What does it take to enable KeepAlive for FastCGI upstream servers? I've set upstream { keepalive 99; } and location { fastcgi_keep_conn on; ] but nginx is still closing the connection after each request. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,275028,275028#msg-275028

Re: Nginx Proxy KeepAlive and FastCGI KeepAlive

2016-09-30 Thread c0nw0nk
Thanks :) I thought the more servers I have within my upstream location would mean I should also increase my keepalive to suit for best performance etc. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,269997,270001#msg-270001 ___ nginx mailin

Re: Nginx Proxy KeepAlive and FastCGI KeepAlive

2016-09-30 Thread itpp2012
A backend is a pool (upstream) for which work is distributed to, the pool size has no bearing to keepalive. Posted at Nginx Forum: https://forum.nginx.org/read.php?2,269997,27#msg-27 ___ nginx mailing list nginx@nginx.org http://mailman.nginx.o

Nginx Proxy KeepAlive and FastCGI KeepAlive

2016-09-30 Thread c0nw0nk
FastCGI : upstream fastcgi_backend { server 127.0.0.1:9000; keepalive 8; } server { ... location /fastcgi/ { fastcgi_pass fastcgi_backend; fastcgi_keep_conn on; ... } } Proxy : upstream http_backend { server 127.0.0.1:80; keepalive 16; } se