<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
Are you sure this isn't something network related, like packet loss/reordering/duplication? What nginx version are you running?<br><br><br><div>> To: nginx@nginx.org<br>> Subject: Connection timed out while connecting to upstream, syn packet volume is high<br>> From: nginx-forum@nginx.us<br>> Date: Mon, 12 Dec 2011 13:24:57 -0500<br>> <br>> I've been troubleshooting this issue on and off the last couple days and<br>> have not been able to eliminate this error from nginx:<br>> <br>> 2011/12/12 13:12:32 [error] 27810#0: *36209658 connect() failed (110:<br>> Connection timed out) while connecting to upstream<br>> <br>> Our setup is a single machine running nginx that serves as reverse proxy<br>> to two separate apache servers. The setup is handling perhaps a few<br>> dozen requests per second. The boxes themselves are almost idle, no<br>> issue with load in that respect.<br>> <br>> The upstream apache servers are not getting hit hard and are no where<br>> near their maxclient settings.<br>> <br>> This error was happening every second or two on the nginx side until I<br>> set "net.ipv4.tcp_syncookies = 1" on the apache machines (not sure why<br>> it wasn't turned out by default). After making that change the<br>> frequency dropped to 1 or 2 connection time outs per minute. Similarly,<br>> leaving syncookies off but increasing "net.ipv4.tcp_max_syn_backlog"<br>> alleviated the issue as well, though didn't stop it entirely.<br>> <br>> If I use tcdump to count syn packets I see 8x the volume to these<br>> nginx-fronted apache machines that I see for other datacenters handling<br>> far more load (hundreds of concurrent connections) that are behind<br>> traditional hardware load balancers.<br>> <br>> Is there a reason nginx would be generating so many syn packets? Or,<br>> anyone have recommended settings for alleviating it as much as possible<br>> at least?<br>> <br>> Any help is greatly appreciated.<br>> <br>> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,219955,219955#msg-219955<br>> <br>> _______________________________________________<br>> nginx mailing list<br>> nginx@nginx.org<br>> http://mailman.nginx.org/mailman/listinfo/nginx<br></div> </div></body>
</html>