From owner-freebsd-net@FreeBSD.ORG Thu May 12 20:50:33 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB77F106564A for ; Thu, 12 May 2011 20:50:33 +0000 (UTC) (envelope-from michael@gameservice.ru) Received: from mail.mzlab.net (mail.mzlab.net [66.197.153.197]) by mx1.freebsd.org (Postfix) with ESMTP id 8EDA18FC15 for ; Thu, 12 May 2011 20:50:33 +0000 (UTC) Date: Thu, 12 May 2011 23:50:22 +0300 From: Michael X-Priority: 3 (Normal) Message-ID: <1069574542.20110512235022@gameservice.ru> To: Maxim Dounin In-Reply-To: <20110512104939.GS42265@mdounin.ru> References: <17710363528.20110512130123@gameservice.ru> <20110512104939.GS42265@mdounin.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 8bit Cc: freebsd-net@freebsd.org Subject: Re: Random TCP 3 second delay X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 May 2011 20:50:33 -0000 MD> 3 seconds delay usually indicate packet loss somewhere along the MD> path. You have to examine your network between nginx and your app MD> to find out where (and why) packets are lost. I don't think i have packet loss, traffic is going via loopback MD> Some basic steps on FreeBSD include looking though "netstat -id", MD> "netstat -s" output, "vmstat -z" output and your ethernet MD> controller stats via "sysctl dev." (if any). I don't see dropped packets on lo0 with netstat -id What should i see in "netstat -s" and "vmstat -z"? MD> You may also want to check if you by accident have some statefull MD> firewall between nginx and backend. I have only ipfw rules, and the first rule is accepting local traffic: 00005 8211184509 4547370329265 allow ip from me to me can this be the problem? Michael