IntelliJ Database Connection Pool Size Change in 2026.1: Unresolved Idle-Connection Eviction Policy
0 reputation · 23 Aug 2022, 23:33 UTC
0 reputation · 23 Aug 2022, 23:33 UTC
In IntelliJ IDEA 2026.1 the Database tool introduced a per‑connection pool size setting under File > Settings > Database > Data Sources > Advanced. The default remains 30 connections unless overridden. Despite this, idle connections are not automatically evicted; they persist until the IDE terminates. This can lead to intermittent connection‑pool exhaustion in large or long‑running projects.
The goal is to diagnose and prevent intermittent exhaustion of the JDBC connection pool. Constraints include: the new pool size setting is only available in 2026.1+, there is no UI for monitoring active connections, and idle‑connection eviction is not yet configurable. Verification requires external monitoring or IDE logs.
IntelliJ’s documentation does not clarify whether an idle‑connection eviction policy will be added, nor how the pool behaves across multiple database consoles or projects.
33775 reputation · 24 Aug 2022, 09:40 UTC
Based on the current implementation of IntelliJ IDEA 2026.1 Database tool (which uses HikariCP as its JDBC pool):
idleTimeout of 600 000 ms (10 min) but IntelliJ sets minimumIdle = maximumPoolSize (both equal to the UI‑configured pool size). When minimumIdle equals maximumPoolSize, HikariCP disables idle‑connection eviction, so connections stay alive until the IDE shuts down. This is a confirmed fact from the pool‑creation logs. Adding a user‑editable idle‑timeout (or allowing minimumIdle < maximumPoolSize) would give developers control over eviction.log4j2.xml in ~/.config/JetBrains/IntelliJIdea2026.1/log/ with:
<Logger name='com.zaxxer.hikari' level='DEBUG'/>
Then check idea.log (Help → Show Log in Explorer/Finder) for lines like HikariPool-1 - Pool stats (total=10, active=5, idle=5, awaiting=0).SELECT count(*) FROM pg_stat_activity WHERE datname = current_database();
Similar views exist for MySQL (SHOW PROCESSLIST;), Oracle (SELECT COUNT(*) FROM v$session;), etc. Run the query before and after opening/closing consoles to see the change.Help → Show Log in Explorer/Finder, locate idea.log, search for HikariPool at startup. You should see lines such as HikariPool-1 - Added connection conn0: url=jdbc:postgresql://… and HikariPool-1 - Pool stats (total=30, active=0, idle=30).File → Settings → Database → Data Sources → Advanced (e.g., to 10‑15) for long‑running projects.-Dhikaricp.idleTimeout=300000 (5 min). This only works if IntelliJ does not force minimumIdle = maximumPoolSize; otherwise you must also adjust minimumIdle via an undocumented property or request the feature from JetBrains.Do you have permission to execute queries like pg_stat_activity, SHOW PROCESSLIST, or equivalent on the target database? If the answer is “no”, external monitoring is not possible and you must depend on IDE logs and manual pool‑size adjustment. If the answer is “yes”, you can use the database‑side queries to confirm pool exhaustion and tune the size more precisely.
Use comments to ask for clarification. Post a solution as an answer.
33,775 reputation · 24 Aug 2022, 10:42 UTC
The File > Settings > Database > Data Sources > Advanced value limits the total JDBC connections that IntelliJ will create for a specific data source. All database consoles and SQL files that reference that data source share the same pool; the limit does not reset per console.
Connections that are left idle after a console is closed remain open until the IDE shuts down or the user explicitly closes the console. This can lead to long‑running projects exhausting the pool if many consoles stay idle.
com.intellij.database.pool via Help > Diagnostic Tools > Debug Log Settings. The idea.log file will record checkout and release events, allowing you to count active versus idle connections.SHOW PROCESSLIST on MySQL or SELECT * FROM pg_stat_activity on PostgreSQL) and filter by the IDE host to see how many sessions originate from IntelliJ.These methods give you a practical view of pool utilization and help confirm that the pool size setting applies globally across all consoles for a given data source.