GithubHelp home page GithubHelp logo

Comments (9)

silverwind avatar silverwind commented on June 20, 2024 4

Just wondering why this fix hasn't propagated to npm yet. Is it because npm/cli depends on pacote@8?

from pacote.

tareqhs avatar tareqhs commented on June 20, 2024 3

Found it !!

The custom agent in https://github.com/TooTallNate/node-agent-base does receive the automatic 'free' event from the underlying socket after the various fetching libraries finish using it but does nothing with it. Technically, this should be used for pooling and reusing TCP connections.

Since the agent does not pool stuff, we should simply close the sockets when they are free by calling socket.end() explicitly. My fix is to close them but I think we should reuse connections in a future improvement.

TooTallNate/node-agent-base#18

from pacote.

tareqhs avatar tareqhs commented on June 20, 2024

hi @zkat , @tgandrews , this is related to my comments in #109

from pacote.

zkat avatar zkat commented on June 20, 2024

Yes, I'm aware -- I just don't know why those connections are staying alive, is the issue. If you manage to track -that- down, that'd be super useful. Last I looked, it was literally only happening when using the proxy libraries.

from pacote.

zkat avatar zkat commented on June 20, 2024

I still think this probably has to do with https-proxy-agent, specially since it's a thing that happens when you proxy. There's relatively little I can do on the pacote and make-fetch-happen end of things if that library is... messing up closure. Can you look into it over on that end? If anyone else is willing to do the necessary sleuthing here, that would be -lovely- (/cc @TooTallNate)

from pacote.

zkat avatar zkat commented on June 20, 2024

omg good job! So excited. I hope this finally resolves this nonsense. 🎉

from pacote.

jjimenez avatar jjimenez commented on June 20, 2024

If I'm reading this right, once make-fetch-happen references agent-base 4.2.1 (pull request: zkat/make-fetch-happen#66), pacote can be updated to reference the right version of make-fetch-happen. Once pacote has the right version, npm can be updated since, as of v6.8.0-next.2, it references the latest pacote.

from pacote.

shartte avatar shartte commented on June 20, 2024

NPM 6.9.0 has fixed this issue for me.

from pacote.

camueller avatar camueller commented on June 20, 2024

Same here - using NPM 6.9.0 "npm i" runs fine using HTTP proxy.

from pacote.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.