title: Node.js suddenly getting extremely slow
body: <p>We have this architecture with 2 node processes. </p>
  
  <p>One polls a private API and pushes the changes to the second node if any.
  The second node process the data and calls a bunch other API's and eventually emits a change event to the client, a HTML5 website, with socket.io</p>
  
  <p>This second node will always process the data and will always emit changes even if no clients are connected. So in my opinion the CPU or mem usage is not that greatly affected by the number of connected clients. Also note that this architecture is still running on a private staging environment.</p>
  
  <p>Everything runs fine and we're ready to go live until we noticed after couple of days, maybe a week, the second node suddenly gets extremely slow while the first node is still fine.</p>
  
  <p>It gets so bad that even the connection between the two nodes gets timed out and they are on the same network over localhost. It also takes more then 10 seconds to browse to the socket.io/socket.io.js file.</p>
  
  <p>I know its very hard to understand the problem without seeing any code but I'm kinda pulling my hair out because we have to go live in couple of days and my logs are not revealing anything and google isn't helping either.</p>
  
  <p><strong>Whats a good practice towards building Have you ever experienced anything like this? What was the problem and how did you fix it?</strong></p>
  
  <p><strong>Whats a good monitor and profiler for node.js? (preferably free)</strong></p>
  
  <p><strong>What are good practices towards building a node.js app with makes a lot of outgoing API calls?</strong></p>
  
  <p>Anything or anyone that could help me in the right direction of solving or even discovering the actual problem will be greatly appreciated!</p>
  
  <p>Thank you!</p>