Giter VIP home page Giter VIP logo

Comments (7)

li5454yong avatar li5454yong commented on July 28, 2024

容器启动的时候这个类被实例化,然后启动了一个线程在运行着

from springboot-httpclient.

Da-Hong avatar Da-Hong commented on July 28, 2024

不好意思了,问一下,这里有必要跑线程一直关http连接吗?http超时后应该释放连接了吧,如果http连接池不够用,新的http请求会处于什么状态呢?

from springboot-httpclient.

xuehf avatar xuehf commented on July 28, 2024

@Da-Hong @li5454yong 同问

from springboot-httpclient.

Da-Hong avatar Da-Hong commented on July 28, 2024

看了一下官方文档,发现和官方介绍的处理线程池的方法一样(少一个关闭30s不活动链接),就是一直监听线程池里的连接状态,及时关闭一些无用的线程,为新的请求腾出资源,只是这些http连接的时间参数的配置不知道如何适配最好。
注意:每个http连接要都要close,要不然线程池会爆的。

from springboot-httpclient.

xuehf avatar xuehf commented on July 28, 2024

image
意思是手动关闭链接?

from springboot-httpclient.

Da-Hong avatar Da-Hong commented on July 28, 2024

@xuehf 从连接池获取一个连接处理http请求,完毕的时候关闭,剩下的就交给IdleConnectionEvictor,因为某些个http请求可能会出现些异常释放不了连接。

from springboot-httpclient.

xuehf avatar xuehf commented on July 28, 2024

tks

from springboot-httpclient.

Related Issues (4)

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.