title: TypeError: msecs must be a number in the running app
body: <p>Yesterday, Eventually I have encountered with the strange issue with all of my API servers during peak hours. There was below mentioned intermittent error. I am using several third party services with the application. Some of the services used with the apps are newrelic, airbrake, pusher etc.</p>
  
  <p>Stack:</p>
  
  <pre><code>Node v0.12.2
  pm2 2.4.5
  request module: 2.81.0
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>Uncaught TypeError: msecs must be a number
  at Object.exports.enroll (timers.js:156:11) 
  at Socket.setTimeout (net.js:329:12) 
  at ClientRequest.&lt;anonymous&gt; (_http_client.js:558:10) 
  at ClientRequest.g (events.js:199:16) 
  at ClientRequest.emit (events.js:129:20) 
  at tickOnSocket (_http_client.js:486:7) at _http_client.js:497:7 at process._tickCallback (node.js:355:11)
  
  Errors in airbrake:
  Error: msecs must be a number
  timers.js:156 in Object.exports.enroll
  net.js:337 in Socket.setTimeout
  _http_client.js:565
  events.js:199 in ClientRequest.g
  events.js:129 in ClientRequest.emit
  _http_client.js:493 in tickOnSocket
  _http_client.js:504
  node.js:381 in process._tickDomainCallback
  </code></pre>
  
  <p>Things I have tried already but nothing helped. The errors were coming continuously for 12-15 hours. </p>
  
  <ol>
  <li>Updating node version to 6.9.1</li>
  <li>Downgrading request module version till 2.2.1</li>
  <li><p>Tried Adding below request timeout where I have used request config.</p>
  
  <p>var request = require('request') 
  request = request.defaults({timeout: 120000})</p></li>
  <li><p>Tried running the app.js with the node.</p></li>
  <li>Tried adding a timeout in .bowerrc.</li>
  <li>Deployed new server and with code again on it, but the error was still there.</li>
  </ol>
  
  <p>The error was not reoccurred from past 3 hours. I am not able to find the RCA and also not sure if it reoccurs in peak hours.</p>
  
  <p>Any idea would be appreciated.</p>