-
Notifications
You must be signed in to change notification settings - Fork 587
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
storage - readStream hangs on long running time pipe #2569
Comments
Thank you for reporting. Could you please provide a clonable repo that can reproduce the bug? Since there are other factors at play to load from the browser, I'll need more dependencies and other code to replicate. It's best that I'm using the same dependencies and code that you are. |
Hi @stephenplusplus , Yes I'll be happy to provide what ever is possible from my side in order to resolve this issue. In this code, you will need to change the
Again, If I'm using my top speed or using the |
Thank you very much! I will look ASAP (likely Monday). |
@stephenplusplus It seems that this issue is reproducing also with the |
Things are looking good. I should have a PR shortly. |
Nice. Can you give more details about what you found? |
PR sent in #2581 - please give it a shot when you can. |
@stephenplusplus looks OK from a simple test :) |
This issue was moved to googleapis/nodejs-storage#24 |
Environment details
Some more details:
The file size I'm reproducing the issue on is ~2.3 gb.
The issue is happening only when using pipe and only when the download speed is below 5 mb\s.
When the download speed is faster or when using
.on('data', (data) => res.write(data))
, there is no problem.Steps to reproduce
@google-cloud/storage
Expected results:
all console logs outputs should be written to console.
Actual results:
The file is downloaded successfully
the 'end' and 'finish' events are never called (no console log outputs and doesn't get into the breakpoint).
Can't call the route again until restarting the application
more details:
When the download speed is not limited, it works fine (on high speed connection). but some users with low speed connections, faced this issue (that's why I reproduced this issue).
When using the commented
.on('data' ...
and commenting out thepipe
, it also works fine also on slow download.It seems that when the
pipe
takes too long (seems like 3-4 minutes), it looses all the event listening functions and gets hangs even though the download finish successfully on the client side.Thanks!
The text was updated successfully, but these errors were encountered: