Comments (3)
The okhttpclient should init only one client instance and use newBuilder() to make method-level configuration effective and be able to reuse connection pools.
The same, httpclient should init only one client instance and use requestConfig.
In current situation the memory is burst.
I try to submit pr, but unfortunately I find the code needs to be refactored urgently. Sorry for my unsubmitted.
from forest.
Thanks for your advice.
I'll use a cache to store clients. The different requests from a same method will have only one client.
But I found a problem that now one client binds a certain request, but the client can not find the corresponding request object if the client become a singleton instance.
from forest.
The problem has been fixed in latest version 1.5.23
Forest will store different clients to caches of different routes.
Forest request will load the corresponding client from cache.
from forest.
Related Issues (20)
- 如果接口和方法都有注解,哪个优先?
- 使用@RefreshScope时报错,服务无法启动
- Java8时间序列化异常 HOT 2
- 是否有计划支持 http5?
- 代码编译报错
- forest-spring-boot3-starter的protobuf-java需要升级
- request URL is empty
- com.dtflys.forest.http.ForestURL#getAuthority有一个判断条件觉得困惑
- 代码的一点疑惑:com.dtflys.forest.reflection.SpringForestObjectFactory#getObject
- bug:在项目运行一段时间后会报StackOverflowError HOT 3
- 使用动态根地址AddressSource,port 不生效
- http 调用错误
- 'DefaultAutoConverter' error:
- 运行一段时间后报错:java.net.SocketException: Too many open files HOT 2
- async beforeExecute not use pool
- Forest是否支持集群配置 HOT 2
- okhttp更新
- 重定向后URL的Query参数会重复增加
- 自定义返回值解码 HOT 5
- @Address注解线程不安全
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 forest.