Hello,
Is there a way to totally disable keepalive form upstream? Right now, I have
the following configuration in upstream to keep the figures to a minimum-
keepalive: 1;
keepalive_requests: 1;
keepalive_timeout: 1s;
keepalive_time: 1s
Since, I can't change the keepalive directive's value to 0, is there a way I
can remove this setting totally?
Thanks!
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,295571,295571#msg-295571
Hello!
On Fri, Oct 21, 2022 at 11:02:20AM -0400, libresco_27 wrote:
> Is there a way to totally disable keepalive form upstream? Right now, I have
> the following configuration in upstream to keep the figures to a minimum-
>
> keepalive: 1;
> keepalive_requests: 1;
> keepalive_timeout: 1s;
> keepalive_time: 1s
>
> Since, I can't change the keepalive directive's value to 0, is there a way I
> can remove this setting totally?
Keepalive connections with upstream servers are disabled by
default. That is, it is enough to remove the "keepalive"
directive from the upstream block to disable connection cache
completely.
Note that you may also want to adjust proxying configuration to
ensure connections are closed by the upstream server when
possible. In particular, make sure you are not using
"proxy_set_header Connection "";" with HTTP proxying and/or
"fastcgi_keep_conn on;" with FastCGI.
See http://nginx.org/r/keepalive for details.
--
Maxim Dounin
http://mdounin.ru/
Thanks for your answer!
I have another query if we can actually see that keepalive is being disabled
in nginx logs.
Is it possible to confirm that if we run nginx in debug mode and if so, what
kind of logs should I look for?
Posted at Nginx Forum: https://forum.nginx.org/read.php?2,295571,295628#msg-295628