Comments (7)
容器启动的时候这个类被实例化,然后启动了一个线程在运行着
from springboot-httpclient.
不好意思了,问一下,这里有必要跑线程一直关http连接吗?http超时后应该释放连接了吧,如果http连接池不够用,新的http请求会处于什么状态呢?
from springboot-httpclient.
from springboot-httpclient.
看了一下官方文档,发现和官方介绍的处理线程池的方法一样(少一个关闭30s不活动链接),就是一直监听线程池里的连接状态,及时关闭一些无用的线程,为新的请求腾出资源,只是这些http连接的时间参数的配置不知道如何适配最好。
注意:每个http连接要都要close,要不然线程池会爆的。
from springboot-httpclient.
from springboot-httpclient.
@xuehf 从连接池获取一个连接处理http请求,完毕的时候关闭,剩下的就交给IdleConnectionEvictor,因为某些个http请求可能会出现些异常释放不了连接。
from springboot-httpclient.
tks
from springboot-httpclient.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from springboot-httpclient.