Global connection budget
A pool limit belongs to a specific scope. Before scaling, count replicas and independent pools per datasource, including other consumers and operating reserve. Four replicas with two pools of fifteen permit up to 120 connections without establishing that all are open. Configured capacity should fit the budget agreed with the dependency. Open Liberty documents connection-manager parameters, but do not copy limits into traditional WebSphere without checking product and version. In an exercise, present the before-and-after calculation and explain how to validate capacity and throughput under representative load.
Acquisition, usage, and execution
Distinguish time to obtain a connection from holding time and SQL execution time. A HikariCP getConnection timeout indicates acquisition waiting; it does not automatically identify a slow query or prove an undersized pool. Capture occupancy, waiting requests, and the holding-time distribution. Connect these observations to stacks and sessions over the same interval. If a release increases connection holding, raising the cap may move the queue into the database. In an exercise, select measures distinguishing insufficient capacity from prolonged work or connections that were not returned.
Session state and waiting
In the PostgreSQL 18 example, state and wait_event describe different dimensions. An active session can be waiting for a lock; active should not be read as continuous CPU use. Identify the query, transaction age, blocker, and relationship to the application request. An idle-in-transaction session retains open transactional work and can still affect other operations. Before ending sessions, bound the population and consult the owner about effects and rollback. A list of IDs without business context does not constitute a recovery plan.
Complete transactions and return resources
Lifecycle handling must cover success, error, and cancellation. In JDBC, explicitly define commit or rollback for an active transaction before closure; close with a pending transaction has implementation-defined results. An exception path that does not return its connection can gradually consume the pool. In an exercise, review a flow failing after acquisition and identify who completes the transaction and releases resources. Under failure, verify that pool capacity returns and operation outcome is known rather than assuming success merely because exceptions stopped appearing.
Leak threshold and connection lifetime
Similarly named settings can control different mechanisms. In HikariCP, the leak threshold produces a warning about time outside the pool; it proves neither permanent leakage nor automatic recovery. A long report can cross that threshold and still return its connection correctly. maxLifetime is not a query timeout either: that mechanism does not retire a connection while it remains in use. Choose appropriate controls for acquisition, query, and transaction phases and confirm driver support. In an exercise, map each symptom to the correct phase before proposing a configuration change.
Accept capacity by useful outcome
A pool change should be evaluated across the whole chain. If acquisition improves while commits fall from 800 to 500 per second, service may have worsened. Define throughput, latency, errors, dependency limits, and reversal criteria in advance. Keep workload and population comparable during the test. If a lock is retained during an external call, assess shortening the transactional section while preserving consistency rather than adding connections waiting for the same resource. Hand RUN the effective values, gate evidence, limitations, and owners of outstanding actions.
Doubling replicas from four to eight while keeping 20 connections per pool raises the ceiling from 80 to 160. Against a 150-session budget, the change requires total-budget review and dependency validation.
Common pitfalls
Local pool as global budget; acquisition timeout as SQL timeout; warning as release; close as guaranteed completion.
Related topics: Investigate the JVM, heap, and pauses · Connect threads, pools, and dependencies · Operate TLS, certificates, and configuration
Size the whole chain and fix connection lifecycle, checking outcomes before increasing concurrency.
Reference: Connection Manager · DR Middleware 2026.4; HotSpot JDK 25; JDBC 25; PostgreSQL 18; RabbitMQ 4.3; OpenSSL 3.5; explicitly scoped runtime references