request get ESOCKETTIMEDOUT
See original GitHub issueenv:
node version v7.10.0
uname -a
Linux iZ2zebqg2v1h2g7jmo9endZ 3.10.0-514.6.2.el7.x86_64 #1 SMP Thu Feb 23 03:04:39 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
request package version: "request": "^2.74.0"
and use express:4.13.4, I find some log:
{ Error: ESOCKETTIMEDOUT
at ClientRequest.<anonymous> (/data1/baas_server/baas_x37/node_modules/request/request.js:819:19)
at Object.onceWrapper (events.js:293:19)
at emitNone (events.js:86:13)
at ClientRequest.emit (events.js:188:7)
at Socket.emitTimeout (_http_client.js:679:10)
at Object.onceWrapper (events.js:293:19)
at emitNone (events.js:86:13)
at Socket.emit (events.js:188:7)
at Socket._onTimeout (net.js:352:8)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5) code: 'ESOCKETTIMEDOUT', connect: false }
I look the source code,get a lot annotation:
var setReqTimeout = function() {
// This timeout sets the amount of time to wait *between* bytes sent
// from the server once connected.
//
// In particular, it's useful for erroring if the server fails to send
// data halfway through streaming a response.
self.req.setTimeout(timeout, function () {
if (self.req) {
self.abort()
var e = new Error('ESOCKETTIMEDOUT')
e.code = 'ESOCKETTIMEDOUT'
e.connect = false
self.emit('error', e)
}
})
}
so i want to why the reason and how to fix the bug; and i don’t know how to trigger it,i only find it in log or find request is error; thanks;
Issue Analytics
- State:
- Created 6 years ago
- Reactions:14
- Comments:26
Top Results From Across the Web
Node.js request module getting ETIMEDOUT and ...
I'm noticing alot of ETIMEDOUT and ESOCKETTIMEDOUT errors although the links are reachable and respond fairly quickly using chrome. I've limit ...
Read more >Node.js request module getting ETIMEDOUT and ...
Hello I am having issues when I execute this request account. ... Node.js request module getting ETIMEDOUT and ESOCKETTIMEDOUT.
Read more >Error: ESOCKETTIMEDOUT with REST request
The request is being processed, we are just not getting our confirmation back and are timing out. We are using node.js with the...
Read more >NodeJS ETIMEDOUT, ESOCKETTIMEDOUT, ENOTFOUND
So I started to analyze a few things and I noticed that NodeJS request package was VERY slow to perform the DNS resolution...
Read more >What does ESOCKETTIMEDOUT mean? - Particle Community
oh, and knowing what the particle webhook request (upstream to ... EDIT2: If I change my lambda timeout to 3 seconds then I...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found if there are too many async requests, then this exception happens in linux. The workaround I’ve found is doing this:
setting this options:
Now the timeout can be lying so you might need to increase it.
I have solve the problem, It’s not about the request. Nginx’s problem.