Giter Site home page Giter Site logo

Comments (3)

silas avatar silas commented on June 12, 2024

I've generally wanted to avoid adding new dependencies to the project and prefer to just let users configure what they need.

Is there any reason that just adding agentkeepalive to your project and passing it in via the agent option doesn't work?

from node-consul.

TysonAndre avatar TysonAndre commented on June 12, 2024

Is there any reason that just adding agentkeepalive to your project and passing it in via the agent option doesn't work?

I can do that and planned to. I'm already overriding the agent and was in the process of adding agentkeepalive. I'm also leaving a note here in case others run into similar slow leaks of inactive sockets, though I still haven't confirmed it's the case.

Separately from that, even without adding agentkeepalive, I'd still recommend setting the timeout to something larger than expected papi timeout - it defaults to infinite. in https://nodejs.org/api/http.html#new-agentoptions

timeout number Socket timeout in milliseconds. This will set the timeout when the socket is created.

from node-consul.

TysonAndre avatar TysonAndre commented on June 12, 2024

It looks like issues I'm seeing are possibly unrelated to idle connections, the consul agent was running locally on the affected applications, so it's probably not networking, but remotely possible to be timeouts. At the time, nobody ran ss --tcp --numeric to see how many consul connections or other connections there were to localhost:8500.

Unrelated: The consul agent deliberately disables http keep-alive by design for all outgoing requests, so the golang agent isn't affected by idle timeouts, either.

from node-consul.

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.