-
Type: New Feature
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Connection Management
-
Not Needed
Hi
After migrating from 4.2.1 to 4.3.1 with the connection pool changes made in JAVA-3927 we find that only allowing 2 new connections at a time is too conservative and would like that value to be configurable.
Our setup used to be (we have 60 worker threads in our app):
.minSize(60) .maxSize(120) .maxConnectionLifeTime(60, TimeUnit.SECONDS) .maxWaitTime(0, TimeUnit.MILLISECONDS)
Due to external factors we need to limit our connection lifetime to 60 seconds, and we have high throughput on our connections, and we need to limit p99 latency spikes which is why we've instructed the driver to time out rather than wait the default 2 seconds.
After upgrading to 4.3.1 we started encountering a LOT of timeouts and changed the settings to:
.minSize(90) .maxSize(120) .maxConnectionLifeTime(60, TimeUnit.SECONDS) .maxWaitTime(50, TimeUnit.MILLISECONDS) .maintenanceFrequency(250, TimeUnit.MILLISECONDS)
(changed max wait to 50ms, increased min-size and lowered maintenance freq)
This takes care of MOST of our time-outs, but we still get the occassional one. It has increased our p99/p100 latency by 50ms, and we're essentially wasting 30 threads per host connecting to the DB.
It'd be most appreciated if we could configure MAX_CONNECTING instead of having it as a static final package-private constant.
- is duplicated by
-
DRIVERS-1943 Make maxConnecting configurable
- Closed
- is related to
-
JAVA-4390 Make maxConnecting configurable
- Closed
- related to
-
JAVA-4316 The background thread should be able to hand over a new connection to a thread that is blocked by the max connecting limit
- Closed