增加出站TCP连接的数量

我正在为websockets开发一个小testing客户端。 我正在使用Ubuntu 11.04。 我已阅读https://stackoverflow.com/questions/410616/increasing-the-maximum-number-of-tcp-ip-connections-in-linux ,我做了以下

sudo sysctl -w net.ipv4.tcp_fin_timeout=10 sysctl -w net.ipv4.ip_local_port_range="1024 65535" 

据我所知这些是入站连接,而不是出站。

当我input

 ulimit -n unlimited 

我的客户和服务器运行在不同的盒子上。 即使以上所有情况,我都无法跨越1000个连线。 如果有不同的提示,请告诉我

回答我通过inputulimit -a来了解这一点,它显示了所有的内核限制。

 ulimit -n unlimited 

 ulimit -a 

返回nofile的值为1024.我以/etc/security/limits.conf文件的格式设置了限制

  <user> soft nofile 8192 <user> hard nofile 65000 

和事情为用户工作

我通过inputulimit -a来解决这个问题,它显示了所有的内核限制。 ulimit -n返回无限制,而ulimit -a返回nofile的值为1024.我以** soft nofile 8192 hard nofile 65000格式在/etc/security/limits.conf文件中设置限制,