Hello!

On Thu, May 12, 2011 at 11:50:22PM +0300, Michael wrote:

> 
> 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

Packet loss is quite possible over loopback as well, though it's 
usually caused by some resource shortage or policy rules in 
action.

BTW, please make sure you don't have net.inet.tcp.nolocaltimewait 
set.

> 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.<driver>" (if any).
> I don't see dropped packets on lo0 with netstat -id
> What  should i see in "netstat -s" and "vmstat -z"?

In netstat - look for various drops and overflows, most notably 
syncache and others tcp-related.  In vmstat -z - look for 
allocation failures and/or full zones, most notably mbufs and 
other tcp-related zones.

> 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?

AFAIK it shouldn't, but you may want to check sysctl 
net.inet.ip.fw.dyn_count and net.inet.ip.fw.dyn_max sysctl's 
anyway.

Maxim Dounin
_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to