nginx / node.js在高负载下丢弃连接

Ubuntu 11.04,node.js 0.6.16,nginx 1.0.8

我开始debugging下面的错误,我们从很重的负载(3500用户积极长时间轮询/使api调用)频繁地从前端logging:

parsererror:Error: jQuery171045845469435053_1347386706235 was not called", 

所有产生这个错误的调用都是通过一个nginx代理到一个node.js服务器的长时间轮询。

发生这种情况时,我发现在服务器的以下位置出现以下错误:

/var/log/syslog我每隔几分钟就会看到一次这样的爆发:

 [6356088.813219] TCP: Possible SYN flooding on port 8894. Sending cookies. 

在nginx error.log ,我看到以下两个错误更频繁的突发:

 2012/09/11 18:13:05 [error] 25104#0: *1229679431 upstream timed out (110: Connection timed out) while connecting to upstream, 

 2012/09/11 18:10:38 [error] 25103#0: *1229382210 recv() failed (104: Connection reset by peer) while reading response header from upstream, 

================================

在过去几个月中,我调整了(除其他之外)以下系统参数,同时我们的stream量稳步增加:

  1. 为运行进程的用户设置ulimit非常高(我认为是16000)
  2. 将nginx worker_connections设置为16024
  3. sysctl net.ipv4.tcp_max_syn_backlognet.core.somaxconn为4096

=================================

这似乎表明,node.js服务器正在closures连接不正常或被系统强制closures它们。 我如何testing我的假设?