title: Node.js WebSocket Daemon
body: <p>I've built somewhat simple websocket server application in node.js on a google cloud running debian, also created daemon service for it "websocket".
  The service was created with <a href="https://gist.github.com/peterhost/715255" rel="nofollow">this script</a>.
  Now, I've got to the load-testing using <a href="https://artillery.io/" rel="nofollow">Artillery</a></p>
  
  <p>The weird thing is - when I run my app like "node Server.js" it is able to handle up to ~<strong>300 requests per second</strong> without any trouble, but runnnig it like "sudo service websocket start" it stops responding at <strong>50 RPS</strong> after about ~20-30 seconds. At this point artillery shows errors: ECONNRESET: NUMBER_OF_ERRORS and websocket becomes unavailable.
  The moment I stop the load-testing it instantly becomes available and responds to requests.
  Service shows "active (running)" the whole time.</p>
  
  <p>I see nothing in the log or journal. Found no info on the web.</p>
  
  <p>I'm kind of new to the linux, is there any additional limitations on the daemon that cause this?</p>
  
  <p>All this is running on Debian 8 Jessie, in a Google Cloud VM. Node.js websocket module is nodejs-websocket: <code>https://www.npmjs.com/package/nodejs-websocket</code></p>