s3.getObject().createReadStream().pipe() hangs in Node v0.10.25
See original GitHub issueThe symptoms are the same as listed here for a previous issue (https://github.com/aws/aws-sdk-js/issues/163).
It seems that intermittently, S3’s getObject() hangs and fails to return a response. When this happens, it prevents all other calls to getObject() from being returned as well, while the rest of the node application continues functioning without reporting any errors.
Supposedly the TLS regression was fixed in v0.10.20, so I shouldn’t be experiencing this error. I do not see this happen terribly often (once every few weeks), so it has been difficult to diagnose. Even when I fire off many API requests, it is impossible to manually recreate this issue.
My usage of this API is quite simple. Something to the effect of:
var params = {Bucket: 'XXXXXXXXXXXXX', Key: 'XXXXXXXXXXXX'};
res.set('Content-Type', 'application/octet-stream');
s3.getObject(params).createReadStream().pipe(res);
Like I said, this is an intermittent problem. If I restart the node application and try the same exact request, the file will download without issue.
If this is not in fact an issue with the S3 API, I would be quite grateful if someone could point me in the right direction for diagnosing the potential Node.js TLS re-regression.
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (3 by maintainers)
@kichooo You can set the maxSockets per client by doing the following:
Closing the issue since upgrading Node seemed to fix it. Feel free to comment if defining a different value for
maxSockets
doesn’t fix the problem.This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.