Date: Thu, 12 May 2011 14:49:39 +0400 From: Maxim Dounin <mdounin@mdounin.ru> To: Michael <michael@gameservice.ru> Cc: freebsd-net@freebsd.org Subject: Re: Random TCP 3 second delay Message-ID: <20110512104939.GS42265@mdounin.ru> In-Reply-To: <17710363528.20110512130123@gameservice.ru> References: <17710363528.20110512130123@gameservice.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello! On Thu, May 12, 2011 at 01:01:23PM +0300, Michael wrote: > I'm running nginx in load balancing mode for java application with > around 400 requests/second. For every request, nginx is doing a > HTTP/1.0 connection without keep alive to jetty. Several > times per minute this connection takes 3 seconds complete. I don't see > 2 or 1 seconds response from upstream, only 3 seconds. Listen backlog is not > overflowed. 3 seconds delay usually indicate packet loss somewhere along the path. You have to examine your network between nginx and your app to find out where (and why) packets are lost. Some basic steps on FreeBSD include looking though "netstat -id", "netstat -s" output, "vmstat -z" output and your ethernet controller stats via "sysctl dev.<driver>" (if any). You may also want to check if you by accident have some statefull firewall between nginx and backend. E.g. pf(4) known to drop some packets when it aproaches limit on state table size. Check "pfctl -s info" and friends if you are using pf. Maxim Dounin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110512104939.GS42265>