Skip to content

Connections not cleaned up if disconnected mid-download?  #523

Description

@jgeewax

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

Activity

  1. added this to the Storage Stable milestone on May 4, 2015
  2. robertdimarco commented on May 4, 2015

    @robertdimarco
    Contributor

    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 call stream.destroy() on the stream returned from the request module.

    Happy to expand further or help out however we can.

  3. robertdimarco commented on Jun 5, 2015

    @robertdimarco
    Contributor

    Thanks everyone for your help here. 👏 👏 👏

  4. 11 remaining items

  5. added a commit that references this issue on Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

api: storageIssues related to the Cloud Storage API.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions