[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nginx
Subject:    Re: proxy_connect_timeout maximum
From:       Maxim Dounin <mdounin () mdounin ! ru>
Date:       2014-08-31 1:30:59
Message-ID: 20140831013059.GR1849 () mdounin ! ru
[Download RAW message or body]

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic