[BUG] Default outbound connection pool is UNBOUNDED (ELASTIC, maxConnections=Integer.MAX_VALUE) with no eviction defaults
- Dominant language
- Java
- Stars
- 8.8k
- Forks
- 3.1k
- Avg merge
- 7d 1h
- Merged PRs (30d)
- 85
Description
## Description
The default outbound proxy pool type is ELASTIC with `maxConnections=Integer.MAX_VALUE` and no background eviction. The gateway opens a new connection for every concurrent request with no ceiling, and idle connections to dead backends are never reaped.
## Location
```
shenyu-spring-boot-starter/.../httpclient/HttpClientFactory.java:192-197 (buildElasticConnectionPool)
HttpClientProperties.java:401 (default PoolType type = ELASTIC)
HttpClientFactory.java:160-162 (maxIdleTime/maxLifeTime/evictionInterval default null)
shenyu-bootstrap/src/main/resources/application.yml (httpclient.pool block commented out)
```
## Impact
Under a traffic burst the gateway opens unbounded TCP connections (FD exhaustion) and never evicts idle connections to decommissioned upstreams. Combined with keepAlive=false, connections are used once and discarded, churning FDs/ephemeral ports.
## Suggested fix
Change default to `FIXED` with a sane `maxConnections`, or cap the ELASTIC pool; ship default `maxIdleTime`/`evictionInterval` and uncomment/tune the pool block in `application.yml`.
## Related existing issue(s)
#6298/#6270/#5987/#6018 are FD leaks (resources not released); this is the pool itself being mis-sized/unbounded — a distinct configuration defect.
_Identified during the 2026-08-02 audit; full list in [`docs/issue-candidates-2026-08-02.md`](docs/issue-candidates-2026-08-02.md)._
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading shenyu-spring-boot-starter/.../httpclient/HttpClientFactory.java around buildElasticConnectionPool and HttpClientProperties.java around the pool defaults. Compare those values with the commented httpclient.pool block in shenyu-bootstrap/src/main/resources/application.yml, then clarify whether the intended fix is a bounded FIXED pool or capped ELASTIC behavior. Done means the shipped defaults bound connections and define idle eviction without relying on manual configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring-boot
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100