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.
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 have tried already but nothing helped. The errors were coming continuously for 12-15 hours.
- Updating node version to 6.9.1
- Downgrading request module version till 2.2.1
-
Tried Adding below request timeout where I have used request config.
var request = require('request') request = request.defaults({timeout: 120000})
-
Tried running the app.js with the node.
- Tried adding a timeout in .bowerrc.
- Deployed new server and deployed code again on it but the error was still there.
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.
Any idea would be appreciable.
via Mohit Kumar
No comments:
Post a Comment