Database connection pool settings govern how many connections an application or pooler can hold, how long callers wait for one, and when unused connections are closed. Their meanings depend on the pooling software: HikariCP’s size is a per-application-pool limit, while PgBouncer’s default pool size applies per user/database pair. Treat the documented defaults below as version-sensitive starting values, not universal tuning advice; the official pages were accessed October 4, 2026.
What pool size actually limits
A pool-size setting is a concurrency and connection-budget limit, not a target to maximize. The critical first question is which connections the setting counts and at what scope.
| Setting | What it limits | Documented default |
|---|---|---|
HikariCP maximumPoolSize |
Total connections in that HikariCP pool, including idle and in-use connections. It is the maximum number of actual backend connections the pool can establish. | 10, according to the HikariCP project documentation. |
PgBouncer default_pool_size |
Server connections per user/database pair. Database- or user-specific pool_size values can override the default. |
20, according to the PgBouncer configuration documentation. |
PgBouncer max_db_connections |
Overall server-connection ceiling for a PgBouncer database, regardless of user. A value of zero means unlimited. | Not stated in the cited PgBouncer configuration documentation. |
PgBouncer max_client_conn |
Number of clients that may connect to the PgBouncer instance. This is a client-side limit, not a backend server-connection limit. | Not stated in the cited PgBouncer configuration documentation. |
Do not compare a HikariCP pool size directly with PgBouncer’s default: one counts a local pool’s total connections, while the other scopes server connections to a user/database pair. An application’s possible backend connections can also multiply across replicas and pools. Inventory every process and pool that reaches the database, then compare the combined potential connections with database capacity and any proxy limits before raising a cap. The cited documentation does not establish a universal sizing formula or capacity figure.
How long callers wait: acquisition timeout
In HikariCP, connectionTimeout is the maximum time a caller waits to obtain a connection when none is available. Its documented default is 30,000 milliseconds (30 seconds), and 250 milliseconds is the lowest allowed setting in the project documentation. If the pool is at its maximum and has no idle connection, acquisition fails when the wait expires.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
This is not a SQL query timeout: it limits waiting to borrow a connection, not the duration of a statement after it begins executing. A short acquisition timeout can make overload visible sooner, but it does not add capacity or explain why connections are unavailable.
Idle connections and cleanup
HikariCP: idleTimeout and minimumIdle
HikariCP’s idleTimeout applies only when minimumIdle is lower than maximumPoolSize. The documented default for minimumIdle equals maximumPoolSize, so the default relationship does not let idle connections shrink below the pool’s maximum. Set the relationship deliberately if you expect the pool to retire surplus idle connections.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
The documented idleTimeout default is 600,000 milliseconds (10 minutes); zero disables idle retirement, and the minimum accepted value is 10,000 milliseconds. HikariCP documents timing variation of up to 30 seconds, averaging 15 seconds, and says a connection is not retired before the configured timeout. The project recommends a fixed-size pool for maximum performance and responsiveness rather than setting minimumIdle without a reason.
PgBouncer: server and pool idle timeouts
PgBouncer’s server_idle_timeout closes an unused server connection after the configured idle period. Its documented default is 600 seconds. By contrast, pool_idle_timeout frees an entire user/database pool only when both client and server connections are absent. Freeing a pool also discards that pool’s statistics, so aggregate monitoring totals may decrease when a pool is removed. These settings act at different levels and are not interchangeable.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteRank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Connection lifetime is different from idle time
HikariCP’s maxLifetime places a cap on a connection’s lifetime independently of whether it has been idle. The documented default is 30 minutes. A connection in use is not retired until it is closed and returned to the pool. HikariCP recommends setting this value a few seconds below any database or infrastructure lifetime restriction.
keepaliveTime is another separate control: it applies only to idle connections, must be below maxLifetime, and has a documented default of two minutes. Review lifetime and keepalive settings when infrastructure drops connections; changing idle-retirement timing does not address the same condition.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
PgBouncer pool mode determines when connections are reused
Pool mode changes when a server connection is released for reuse. It is an application-compatibility decision, not simply another size setting.
| PgBouncer mode | When server connection is released | Important constraint |
|---|---|---|
| Session | When the client disconnects. | Connection reuse waits for the client session to end. |
| Transaction | When the transaction completes. | Check that application behavior does not depend on retaining a server connection beyond a transaction. |
| Statement | When each query completes. | Multi-statement transactions are disallowed. |
Choose only after checking how the application uses transaction boundaries and session behavior. The documented mode differences do not show that one mode is universally better.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
How to diagnose waiting, idle counts, and dropped connections
- Callers wait while the pool is full: This can indicate saturation, connections held for a long time, or slow work. The acquisition timeout controls how long callers wait before failing; it does not identify the cause.
- Many connections appear idle: That can be expected with a fixed-size HikariCP pool or when
minimumIdleis set at the maximum. An idle count by itself does not prove a leak. - Unused connections remain open: Check whether HikariCP idle retirement is enabled and whether
minimumIdleis belowmaximumPoolSize. Separately check whether PgBouncer’s server idle timeout applies; these controls clean up different pools and connection layers. - Connections are dropped by the database or network: Review HikariCP connection lifetime and keepalive settings separately from idle cleanup.
- PgBouncer accepts many clients but backend connections are constrained: Check client limits separately from per-pair pool size and database-wide server limits. When increasing
max_client_conn, account for operating-system file descriptors: PgBouncer notes that possible descriptor use may exceed the client limit because server pools also consume descriptors.
A practical tuning sequence
- Map the connection path. List application replicas, each application-side pool, and any PgBouncer instance between the application and database. Record which caps are per process, per user/database pair, or aggregate.
- Measure the symptom. Distinguish acquisition waits and failures from query duration, idle connections from in-use connections, and client counts from backend server connections.
- Check setting interactions. For HikariCP, inspect
maximumPoolSize,minimumIdle, andidleTimeouttogether; reviewmaxLifetimeandkeepaliveTimeseparately. For PgBouncer, inspect pool-size overrides, aggregate limits, pool mode, and the relevant idle timeout. - Compare the possible connection total with capacity. Include all replicas and pools, plus PgBouncer’s per-pair and aggregate limits. Do not raise a local pool limit without considering the connections it can multiply across the deployment.
- Change one cause-matched setting at a time and observe the result. Validate against the deployed software version and workload; the documented defaults alone do not establish a suitable production value.
For exact parameter descriptions and version details, consult the HikariCP project documentation and PgBouncer configuration documentation.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

