Welcome! Log In Create A New Profile

Advanced

Re: proxy_connect_timeout maximum

Maxim Dounin
August 30, 2014 09:32PM
Hello!

On Fri, Aug 29, 2014 at 02:07:05PM -0400, lspasam wrote:

> Hello,
> I am receiving "upstream timed out (110: Connection timed out) while
> connecting to upstream, client" errors. They are comet calls and I wonder if
> increasing the proxy_connect_timeout will help. i have increased

Unlikely. The default is 60 seconds, and it's enough for TCP
3-way handshake even in case of very distant servers. If a
handshake can't complete within 60 seconds, it means that there is
something wrong with your backend server - e.g. the server is
overloaded and can't accept new connections.

> proxy_send_timeout and proxy_read_timeout to 6000 and have turned off
> proxy_buffering. The docs say that the proxy_connect_timeout cannot
> "usually" exceed 75s. All my searches regarding nginx and comet return
> config files that have proxy_connect_timeout values exceeding 75s. Is there
> a max value for this?

Maximum value for proxy_connect_timeout is determined by OS
settings. Under traditional BSD it's 75s, and on FreeBSD it can
be changed using the net.inet.tcp.keepinit sysctl. On modern
Linuxes the default seems to be 20s, and should be possible to
change it by setting retry count in net.ipv4.tcp_syn_retries.

As previously noted though, it's highly unlikely that changing this
will help. You should look into what happens with your backend
instead.

--
Maxim Dounin
http://nginx.org/

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

proxy_connect_timeout maximum

lspasam August 29, 2014 02:07PM

Re: proxy_connect_timeout maximum

Maxim Dounin August 30, 2014 09:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 281
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