title: Socket IO infinite loop over 1000 connections
body: <p>I need to benchmark multiples socket connections. I've got a nodejs server with this following code :</p>
  
  <pre><code>var io = require('./lib/node_modules/socket.io').listen(12345)
  
  io.sockets.on("connect", function(socket) {
      console.log("Socket " + socket.id + " connected.")
  
      socket.on("disconnect", function() {
          console.log("Socket " + socket.id +" disconnected.")
      })
  })
  </code></pre>
  
  <p>and a nodejs client :</p>
  
  <pre><code>var port            = 12345
  ,   nbSocket        = 1000
  ,   io              = require("./lib/node_modules/socket.io-client")
  
  for (var i = 1;i &lt;= nbSocket;i++)
  {
      var socket = io.connect("http://&lt;&lt;my_ip&gt;&gt;:" + port, {forceNew: true})
  }
  </code></pre>
  
  <p>When client code was executed, server correctly connects sockets and ends normally.</p>
  
  <p>But if we change nbSocket to 2000, server never ends connecting and disconnecting sockets.</p>
  
  <p>We already tried to change the limit with :</p>
  
  <pre><code>ulimit -n5000
  </code></pre>
  
  <p>But it didn't worked. Is there another limit somewhere or something we missed ?</p>