Yesterday, in the end, I ran into a weird problem with all of my API servers during peak hours. Below was the intermittent error mentioned. I use several third-party services with the application. Some of the services used with applications are newrelic, airbrake, pusher, etc.
Stack
Node v0.12.2
pm2 2.4.5
request module: 2.81.0
Error:
Uncaught TypeError: msecs must be a number
at Object.exports.enroll (timers.js:156:11)
at Socket.setTimeout (net.js:329:12)
at ClientRequest.<anonymous> (_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
Things I already tried but nothing helped. Errors lasted for 12-15 hours.
- Update node version to 6.9.1
- Version of the module for the version with reduced rating to version 2.2.1
I tried adding below the request timeout, where I used the request configuration.
request var = require ('request') request = request.defaults ({timeout: 120000})
Tried to work with app.js using node.
- I tried adding a timeout to .bowerrc.
- , .
3 . RCA, , .
.