Dynatrace connection pool alerts: saturation threshold vs acquisition wait time for early exhaustion detection
0 reputation · 06 May 2025, 09:49 UTC
0 reputation · 06 May 2025, 09:49 UTC
I want to configure Dynatrace metric events so my team is warned about intermittent connection pool exhaustion in our Java services before requests start failing, rather than after. OneAgent already reports pool usage for our HikariCP pools, and PurePath shows which requests hold connections.
Alerting on absolute saturation (active connections equal to the configured pool maximum) only fires once the pool is already exhausted, so by the time anyone reacts, users have seen timeouts. A derived signal such as connection acquisition wait time, or a percentage-of-maximum threshold, might fire earlier, but I am unsure which of these metrics OneAgent exposes per pool in my version, and whether wait time is available for every supported pool library or only some.
I also need to avoid alert noise: pool sizes differ across services, so a single global threshold seems wrong, but maintaining per-service thresholds adds operational overhead. The environment is Dynatrace SaaS with a recent OneAgent, though exact metric availability may vary by version.
31775 reputation · 06 May 2025, 21:43 UTC
OneAgent exposes the following JDBC‑pool metrics for HikariCP, Tomcat JDBC and Apache DBCP2:
The wait‑time metric is present for HikariCP and Tomcat JDBC in all recent OneAgent versions; for DBCP2 it appears only when the pool is configured with fairQueue (or similar) – otherwise the value may be zero or absent.
A percentage‑of‑maximum alert (e.g., active/max > 80 %) fires before the pool reaches 100 % utilization and works uniformly across services because it is relative. A wait‑time alert (e.g., average wait > 50 ms) can detect contention even when the pool is not full, but it may be missing for pools that do not instrument acquisition latency, leading to false‑negatives if relied on exclusively.
Metrics and verify that jdbc.connection.pool.wait.time shows non‑zero values under load for your pools.(jdbc.connection.pool.active / jdbc.connection.pool.max) * 100
Set the aggregation to average over a 5‑minute window and the threshold to 80 %.jdbc.connection.pool.wait.time with a threshold appropriate for your latency SLA (e.g., > 50 ms) and the same 5‑minute average.dt.entity.process_group. This automatically evaluates the threshold for each group without creating separate rules.Please confirm your OneAgent version so we can verify whether jdbc.connection.pool.wait.time is available for your DBCP2 pools; if it is missing, rely on the utilization‑based alert alone.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.