Repository navigation
Connections not cleaned up if disconnected mid-download? #523
Description
Activity
- addedapi: storageIssues related to the Cloud Storage API.Issues related to the Cloud Storage API.
on May 4, 2015 Thanks for filing these issues and resolving them so quickly! 👏
This one is the trickiest of the bunch, and (in my view) doesn't have the clearest resolution. In the prior example on #522, without removing the connection limits, the issue is easily reproduced by having a client request a large file and hang-up part-way through that file.
Our short-term resolution for this issue was (a) remove the Node v0.10 socket pooling limits, and (b) listen for the client hang-up / socket close, and try to invoke
stream.abort()on the through-stream returned from this module. That last bit improves the situation, but appears to be error-prone and I think does not pass-through and callstream.destroy()on the stream returned from the request module.Happy to expand further or help out however we can.
Thanks everyone for your help here. 👏 👏 👏
11 remaining items
- added a commit that references this issue
on Jan 10, 2023 - added a commit that references this issue
on Sep 14, 2023 - added a commit that references this issue
on Jul 23, 2025 - added 2 commits that reference this issue
on Jan 14, 2026 - added 6 commits that reference this issue
on Jan 27, 2026 - added 2 commits that reference this issue
on Feb 24, 2026 - added a commit that references this issue
on Mar 18, 2026
See #522 for the sample code.
In that example, if a client disconnects mid-way through a download, the connection apparently doesn't get cleaned up, and we're left with N-1 available connections in the pool.
Can we make sure that if a connection is broken, we clean up the socket and toss it ?
/cc @robertdimarco