6.0.1 — pooled connections pinged only after idling, and a diagnostic kit for the DBA
The remaining SELECT 1 traffic to the warehouse is gone. A diagnostic kit
helps a DBA find what is really driving disk activity.
Changed
- Pooled connections are pinged only after they have been idle (PR #124). With
pool_pre_ping, every checkout of a warehouse connection sent aSELECT 1first, so the warehouse saw one ping per query.- A connection is now pinged only if it has been idle for at least
DB_POOL_PING_IDLE_SECONDS(default 60).0pings on every checkout, andDB_POOL_PRE_PING=falsenever pings. - A failed ping refreshes the whole pool, and the checkout is retried on a fresh connection.
- Measured on 20 back-to-back questions: 20 pings in 5.2.0 and 6.0.0, none now. An idle application sends nothing.
- Trade-off: a connection the server drops before it reaches the idle threshold makes one query fail before the pool recovers.
- A connection is now pinged only if it has been idle for at least
/healthalways sends its ownSELECT 1(PR #124), so it still verifies the database when the checkout was not pinged.- Comments and test docstrings describe behaviour, not history (PR #125).
Added
-
A read-only diagnostic kit for the DBA (PR #124).
docs/dba/warehouse-load-diagnostics.sqlanddocs/dba/README.mdshow:- whether
AUTO_CLOSEis on; - this application's sessions (
program_name = 'local-sql-agent'); - which database file (data, log or tempdb) is busy;
- the queries with the most physical reads;
- login audit and trigger checks.
SELECT 1reads no data pages, so disk activity that coincides with it usually comes from something else. - whether
Upgrading
- No action needed. The new
DB_POOL_PING_IDLE_SECONDSdefaults to 60; set it to0to keep pinging on every checkout. - Upgrading from 5.x: follow the Upgrading steps of 6.0.0 first (the system prompt must be at
<PROJECT_CONFIG_DIR>/system_prompt.md).