-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
httpresponse pause()/resume() leads to out-of-memory error when using local server #2074
Comments
That version does not exist.
Tested using v12.6.0 and unable to reproduce the issue. The memory usage stays at 3MB. |
I have also tested it on Node 12.7.0 and it does not reproduce there:
However it DOES reproduce on Node v10.16.0:
And it also reproduces on was 8.15.1 (my typo). |
Thanks for the update. This is indeed the same issue as nodejs/node#26957, which is fixed in nodejs/node#26965 (v12.x). Backport requests to v8.x and v10.x have been raised, but have not landed to these versions yet (see reasons why). There is v10.16.1 proposal, which includes the commit |
Thank you very much for the explanation! Here is my workaround which works fine on node 8.x and 10.x, can you please let me know whether it is valid workaround or there are some underwater issues here?
|
@gyunaev , is this issue still outstanding? looks like this can be closed now. let me know if that is not the case |
No, it no longer exists in the latest versions of node.js, thanks! |
Consider the following HTTP client which receives HTTP data stream using
data
event. This stream contains commands which have to be executed in a sequence. Thus the client pauses the receiver while processing the received data buffer, and then resumes it after it is ready again.Here is the sample client code, where processing delay is implemented using timeouts:
This works fine with the server on Internet. However with a server running locally it starts eating memory, and very fast runs out of memory and crashes:
Here is an example of the simple server which reproduces the issue:
The text was updated successfully, but these errors were encountered: