The only agent that thinks for itself

Autonomous Monitoring with self-learning AI built-in, operating independently across your entire stack.

Unlimited Metrics & Logs
Machine learning & MCP
5% CPU, 150MB RAM
3GB disk, >1 year retention
800+ integrations, zero config
Dashboards, alerts out of the box
> Discover Netdata Agents

Centralized metrics streaming and storage

Aggregate metrics from multiple agents into centralized Parent nodes for unified monitoring across your infrastructure.

Stream from unlimited agents
Long-term data retention
High availability clustering
Data replication & backup
Scalable architecture
Enterprise-grade security
> Learn about Parents

Fully managed cloud platform

Access your monitoring data from anywhere with our SaaS platform. No infrastructure to manage, automatic updates, and global availability.

Zero infrastructure management
99.9% uptime SLA
Global data centers
Automatic updates & patches
Enterprise SSO & RBAC
SOC2 & ISO certified
> Explore Netdata Cloud

Deploy Netdata Cloud in your infrastructure

Run the full Netdata Cloud platform on-premises for complete data sovereignty and compliance with your security policies.

Complete data sovereignty
Air-gapped deployment
Custom compliance controls
Private network integration
Dedicated support team
Kubernetes & Docker support
> Learn about Cloud On-Premises

Powerful, intuitive monitoring interface

Modern, responsive UI built for real-time troubleshooting with customizable dashboards and advanced visualization capabilities.

Real-time chart updates
Customizable dashboards
Dark & light themes
Advanced filtering & search
Responsive on all devices
Collaboration features
> Explore Netdata UI

Monitor on the go

Native iOS and Android apps bring full monitoring capabilities to your mobile device with real-time alerts and notifications.

iOS & Android apps
Push notifications
Touch-optimized interface
Offline data access
Biometric authentication
Widget support
> Download apps

The future of infrastructure observability

See our strategic direction across AI-native observability, full-stack signals, operational intelligence, and enterprise platform maturity.

AI-native observability
Full-stack signal coverage
Operational intelligence
Enterprise platform maturity
Agent releases every 6 weeks
Cloud continuous delivery
> Explore Product Roadmap

Best energy efficiency

True real-time per-second

100% automated zero config

Centralized observability

Multi-year retention

High availability built-in

Zero maintenance

Always up-to-date

Enterprise security

Complete data control

Air-gap ready

Compliance certified

Millisecond responsiveness

Infinite zoom & pan

Works on any device

Native performance

Instant alerts

Monitor anywhere

AI-native observability

Continuous delivery

Open source foundation

80% Faster Incident Resolution

AI-powered troubleshooting from detection, to root cause and blast radius identification, to reporting.

True Real-Time and Simple, even at Scale

Linearly and infinitely scalable full-stack observability, that can be deployed even mid-crisis.

90% Cost Reduction, Full Fidelity

Instead of centralizing the data, Netdata distributes the code, eliminating pipelines and complexity.

See and Map Your Entire Network

Live topology, flow analytics, and SNMP device and trap monitoring — unified with your full-stack observability.

Control Without Surrender

SOC 2 Type 2 certified with every metric kept on your infrastructure.

Integrations

800+ collectors and notification channels, auto-discovered and ready out of the box.

800+ data collectors
Auto-discovery & zero config
Cloud, infra, app protocols
Notifications out of the box
> Explore integrations
Real Results
46% Cost Reduction

Reduced monitoring costs by 46% while cutting staff overhead by 67%.

— Leonardo Antunez, Codyas

Zero Pipeline

No data shipping. No central storage costs. Query at the edge.

From Our Users
"Out-of-the-Box"

So many out-of-the-box features! I mostly don't have to develop anything.

— Simon Beginn, LANCOM Systems

No Query Language

Point-and-click troubleshooting. No PromQL, no LogQL, no learning curve.

Enterprise Ready
67% Less Staff, 46% Cost Cut

Enterprise efficiency without enterprise complexity—real ROI from day one.

— Leonardo Antunez, Codyas

SOC 2 Type 2 Certified

Zero data egress. Only metadata reaches the cloud. Your metrics stay on your infrastructure.

Full Coverage
800+ Collectors

Auto-discovered and configured. No manual setup required.

Any Notification Channel

Slack, PagerDuty, Teams, email, webhooks—all built-in.

Built for the People Who Get Paged

Because 3am alerts deserve instant answers, not hour-long hunts.

Every Industry Has Rules. We Master Them.

See how healthcare, finance, and government teams cut monitoring costs 90% while staying audit-ready.

Monitor Any Technology. Configure Nothing.

Install the agent. It already knows your stack.
From Our Users
"A Rare Unicorn"

Netdata gives more than you invest in it. A rare unicorn that obeys the Pareto rule.

— Eduard Porquet Mateu, TMB Barcelona

99% Downtime Reduction

Reduced website downtime by 99% and cloud bill by 30% using Netdata alerts.

— Falkland Islands Government

Real Savings
30% Cloud Cost Reduction

Optimized resource allocation based on Netdata alerts cut cloud spending by 30%.

— Falkland Islands Government

46% Cost Cut

Reduced monitoring staff by 67% while cutting operational costs by 46%.

— Codyas

Real Coverage
"Plugin for Everything"

Netdata has agent capacity or a plugin for everything, including Windows and Kubernetes.

— Eduard Porquet Mateu, TMB Barcelona

"Out-of-the-Box"

So many out-of-the-box features! I mostly don't have to develop anything.

— Simon Beginn, LANCOM Systems

Real Speed
Troubleshooting in 30 Seconds

From 2-3 minutes to 30 seconds—instant visibility into any node issue.

— Matthew Artist, Nodecraft

20% Downtime Reduction

20% less downtime and 40% budget optimization from out-of-the-box monitoring.

— Simon Beginn, LANCOM Systems

Pay per Node. Unlimited Everything Else.

One price per node. Unlimited metrics, logs, users, and retention. No per-GB surprises.

Free tier—forever
No metric limits or caps
Retention you control
Cancel anytime
> See pricing plans

What's Your Monitoring Really Costing You?

Most teams overpay by 40-60%. Let's find out why.

Expose hidden metric charges
Calculate tool consolidation
Customers report 30-67% savings
Results in under 60 seconds
> See what you're really paying

Your Infrastructure Is Unique. Let's Talk.

Because monitoring 10 nodes is different from monitoring 10,000.

On-prem & air-gapped deployment
Volume pricing & agreements
Architecture review for your scale
Compliance & security support
> Start a conversation

Monitoring That Sells Itself

Deploy in minutes. Impress clients in hours. Earn recurring revenue for years.

30-second live demos close deals
Zero config = zero support burden
Competitive margins & deal protection
Response in 48 hours
> Apply to partner

Per-Second Metrics at Homelab Prices

Same engine, same dashboards, same ML. Just priced for tinkerers.

Community: Free forever · 5 nodes · non-commercial
Homelab: $90/yr · unlimited nodes · fair usage
> Get the Homelab Plan

$1,000 Per Referral. Unlimited Referrals.

Your colleagues get 10% off. You get 10% commission. Everyone wins.

10% of subscriptions, up to $1,000 each
Track earnings inside Netdata Cloud
PayPal/Venmo payouts in 3-4 weeks
No caps, no complexity
> Get your referral link
Cost Proof
40% Budget Optimization

"Netdata's significant positive impact" — LANCOM Systems

Calculate Your Savings

Compare vs Datadog, Grafana, Dynatrace

Savings Proof
46% Cost Reduction

"Cut costs by 46%, staff by 67%" — Codyas

30% Cloud Bill Savings

"Reduced cloud bill by 30%" — Falkland Islands Gov

Enterprise Proof
"Better Than Combined Alternatives"

"Better observability with Netdata than combining other tools." — TMB Barcelona

Real Engineers, <24h Response

DPA, SLAs, on-prem, volume pricing

Why Partners Win
Demo Live Infrastructure

One command, 30 seconds, real data—no sandbox needed

Zero Tickets, High Margins

Auto-config + per-node pricing = predictable profit

Homelab Ready
Free Video Course

8-episode Netdata tutorial by LearnLinux.tv

76k+ GitHub Stars

3rd most starred monitoring project

Worth Recommending
Product That Delivers

Customers report 40-67% cost cuts, 99% downtime reduction

Zero Risk to Your Rep

Free tier lets them try before they buy

AI Support Assistant, Available 24/7

Nedi has access to all official documentation, source code, and resources. Ask any question about Netdata—responds in your language.

Deployment & configuration
Troubleshooting & sizing
Alerts & notifications
Evidence-based answers
> Ask Nedi now

Never Fight Fires Alone

Docs, community, and expert help—pick your path to resolution.

Learn.netdata.cloud docs
Discord, Forums, GitHub
Premium support available
> Get answers now

60 Seconds to First Dashboard

One command to install. Zero config. 850+ integrations documented.

Linux, Windows, K8s, Docker
Auto-discovers your stack
> Read our documentation

76,000+ Engineers Strong

615+ contributors. 1.5M daily downloads. One mission: simplify observability.

Per-Second. 90% Cheaper. Data Stays Home.

Side-by-side comparisons: costs, real-time granularity, and data sovereignty for every major tool.

See why teams switch from Datadog, Prometheus, Grafana, and more.

> Browse all comparisons
Edge-Native Observability, Born Open Source
Per-second visibility, ML on every metric, and data that never leaves your infrastructure.
Founded in 2016
615+ contributors worldwide
Remote-first, engineering-driven
Open source first
> Read our story
Promises We Publish—and Prove
12 principles backed by open code, independent validation, and measurable outcomes.
Open source, peer-reviewed
Zero config, instant value
Data sovereignty by design
Aligned pricing, no surprises
> See all 12 principles
Edge-Native, AI-Ready, 100% Open
76k+ stars. Full ML, AI, and automation—GPLv3+, not premium add-ons.
76,000+ GitHub stars
GPLv3+ licensed forever
ML on every metric, included
Zero vendor lock-in
> Explore our open source
Build Real-Time Observability for the World
Remote-first team shipping per-second monitoring with ML on every metric.
Remote-first, fully distributed
Open source (76k+ stars)
Challenging technical problems
Your code on millions of systems
> See open roles
Meet the Team Behind Netdata
Conferences, meetups, and tradeshows where you can see Netdata in action and talk to the engineers who build it.
Live demos and deep dives
Book 1-on-1 meetings
Talks and panel sessions
Event recaps and photos
> See all events
Talk to a Netdata Human in <24 Hours
Sales, partnerships, press, or professional services—real engineers, fast answers.
Discuss your observability needs
Pricing and volume discounts
Partnership opportunities
Media and press inquiries
> Book a conversation
Your Data. Your Rules.
On-prem data, cloud control plane, transparent terms.
Trust & Scale
76,000+ GitHub Stars

One of the most popular open-source monitoring projects

SOC 2 Type 2 Certified

Enterprise-grade security and compliance

Data Sovereignty

Your metrics stay on your infrastructure

Validated
University of Amsterdam

"Most energy-efficient monitoring solution" — ICSOC 2023, peer-reviewed

ADASTEC (Autonomous Driving)

"Doesn't miss alerts—mission-critical trust for safety software"

Community Stats
615+ Contributors

Global community improving monitoring for everyone

1.5M+ Downloads/Day

Trusted by teams worldwide

GPLv3+ Licensed

Free forever, fully open source agent

Why Join?
Remote-First

Work from anywhere, async-friendly culture

Impact at Scale

Your work helps millions of systems

$ guides / pgbouncer / pgbouncer-maxwait-high ▌

Operations Guides

PgBouncer maxwait high: the oldest client waiter and how close it is to timing out

You opened SHOW POOLS because an application is slow, and one column stands out: maxwait is 8, 20, maybe 90 seconds. That number is the age of the oldest client sitting in PgBouncer’s FIFO wait queue, computed from the query_start of the first waiter. It is the worst-case queuing latency any client is experiencing right now, before its query even reaches PostgreSQL.

maxwait is more actionable than the cl_waiting count. cl_waiting tells you how many clients are blocked; maxwait tells you how much it hurts. A queue of 50 clients that drains in 200ms is a burst. A queue of 3 clients where the oldest has waited 45 seconds is an incident.

The metric matters because of what happens at the end of it. PgBouncer disconnects a waiter when its wait exceeds query_wait_timeout (default 120 seconds), so maxwait is also a countdown to the oldest client being killed with an error. If your application has a shorter timeout than 120s, it gives up and retries first, and those retries join the back of the queue and make everything worse.

What this means

When all server connections in a pool are busy, new client queries enter a per-(database, user) FIFO queue. maxwait (seconds, plus maxwait_us for the microsecond remainder) measures the head of that queue. Zero means nobody is waiting. Anything sustained above zero means the pool cannot keep up with demand.

Operational heuristics that match what most OLTP applications experience:

maxwaitWhat it usually means
0No queuing. Healthy.
>1sNoticeable added latency. Investigate if sustained.
>5sImpacting user experience. Applications with tight SLAs are degrading.
>15sLikely causing application timeouts and retries. Treat as an incident.
approaching query_wait_timeout (default 120s)The oldest waiter is about to be disconnected with an error.

Two nuances before you escalate:

  • maxwait counts from when the query was sent, not from when the client connected. A client connected for hours in session mode contributes nothing to maxwait until it submits a query that has to queue.
  • Check paused/disabled state first. During an administrative PAUSE <db>, new queries queue while existing transactions finish, so cl_waiting and maxwait spike by design. DISABLE rejects new clients but lets existing ones work. Both look alarming and are expected during maintenance. SHOW DATABASES exposes paused and disabled columns; check them before treating any queue depth as an outage.
flowchart TD
  A[maxwait rising] --> B{SHOW DATABASES: paused or disabled?}
  B -- yes --> C[Expected maintenance behavior. Do not escalate.]
  B -- no --> D{sv_active at pool_size?}
  D -- yes --> E{avg_query_time elevated?}
  E -- yes --> F[Backend slow: connections held too long. Go to PostgreSQL.]
  E -- no --> G[Pool undersized or idle-in-transaction holding slots.]
  D -- no --> H{sv_login elevated, total server connections declining?}
  H -- yes --> I[Backend connection failure: auth, network, DNS, or max_connections.]
  H -- no --> J[Check reserve pool, event loop CPU, and per-pool breakdown.]

Common causes

CauseWhat it looks likeFirst thing to check
Pool size too small for the workloadsv_active pinned at pool_size, sv_idle at 0, queue grows during every traffic peakavg_query_time: if it is low, the backend is fine and the pool is undersized
Slow queries on PostgreSQLavg_query_time elevated 2x+ over baseline, connections returned slowly, maxwait climbsSHOW STATS_AVERAGES for avg_query_time; then pg_stat_activity on the backend
Idle-in-transaction clientssv_active at pool_size, but avg_xact_time much larger than avg_query_timeSHOW SERVERS: active connections with old request_time; pg_stat_activity shows idle in transaction
Backend connection failuresv_login elevated, total server connections declining, sv_idle draining to zeroPgBouncer log for “connect failed”, “S: login failed”, “server DNS lookup failed”
Long transactions in session modeA few clients hold server connections for minutes; queue builds behind themSHOW SERVERS request_time, identify the linked client via SHOW CLIENTS
Administrative PAUSEcl_waiting spikes, sv_active drains to zero, paused = 1 in SHOW DATABASESSHOW DATABASES paused/disabled columns
Event loop saturationAll pools slow at once, admin console itself sluggish, PgBouncer CPU near 100% of one coretime psql ... -c "SHOW LISTS" for admin console latency; process CPU
Reserve pool masking an undersized base poolTotal server connections exceed pool_size; log shows “taking connection from reserve_pool”Compare sum of sv_* per pool against pool_size from SHOW DATABASES

Quick checks

All commands below are read-only and safe to run during an incident. They assume the admin console on port 6432 with the pgbouncer admin database; adjust host, port, and user for your deployment.

# Full pool snapshot: cl_waiting, maxwait, sv_active, sv_idle, sv_login per pool
psql -h /var/run/postgresql -p 6432 -U pgbouncer pgbouncer -Atc "SHOW POOLS;"

# Maintenance context FIRST: paused and disabled columns
psql -h /var/run/postgresql -p 6432 -U pgbouncer pgbouncer -Atc "SHOW DATABASES;"

# Separate pool wait from backend latency (values in microseconds)
psql -h /var/run/postgresql -p 6432 -U pgbouncer pgbouncer -Atc "SHOW STATS_AVERAGES;"

# Per-client wait detail: who is waiting and for how long (wait, wait_us columns)
psql -h /var/run/postgresql -p 6432 -U pgbouncer pgbouncer -Atc "SHOW CLIENTS;"

# Per-server detail: which connections are stuck and how long they have been active
psql -h /var/run/postgresql -p 6432 -U pgbouncer pgbouncer -Atc "SHOW SERVERS;"

# Confirm the actual timeout the oldest waiter is racing against
psql -h /var/run/postgresql -p 6432 -U pgbouncer pgbouncer -Atc "SHOW CONFIG;" | grep -E "query_wait_timeout|pool_size|reserve_pool"

# Event loop health: admin console should answer in well under 100ms
time psql -h /var/run/postgresql -p 6432 -U pgbouncer pgbouncer -c "SHOW LISTS;" > /dev/null

# Error evidence: PgBouncer exposes zero error counters via SHOW; logs are the only source
grep -E "query_wait_timeout|connect failed|login failed|reserve_pool" /var/log/pgbouncer/pgbouncer.log | tail -30

Column positions in SHOW POOLS and SHOW STATS output have changed across releases as new counters were added. Server-assignment counters arrived in 1.23; prepared-statement counters were exposed in 1.24. Reference columns by name in any scripted check, not by field index.

How to diagnose it

  1. Rule out maintenance. Run SHOW DATABASES and check paused and disabled. If the affected database is paused, the queue is intentional. Coordinate with whoever ran PAUSE on RESUME timing. Do not escalate further.

  2. Confirm the queue is real and sustained. Poll SHOW POOLS a few times, 10 to 15 seconds apart. A single snapshot showing cl_waiting > 0 with maxwait under a second is a burst, especially in transaction pooling mode where the pool turns over quickly. Sustained maxwait above 5 seconds is where you start treating it as an incident.

  3. Identify which pool is hurting. maxwait and cl_waiting are per (database, user). One saturated pool can sit next to many healthy ones. Note the database and user of the worst pool; everything after this is scoped to it.

  4. Split pool wait from database time. In SHOW STATS_AVERAGES, compare avg_wait_time against avg_query_time for that database. High wait with low query time means PostgreSQL is fast and the pool is undersized or connections are being held idle. High query time means the backend is the root cause and PgBouncer is the messenger. This single comparison decides which half of the system you debug next.

  5. Check supply vs demand. Compare sv_active in SHOW POOLS against pool_size in SHOW DATABASES. If sv_active equals pool_size and sv_idle is 0, the pool is fully saturated. If sv_active is well below pool_size while clients queue, server connections are not being created: look at sv_login, per-database current_connections vs max_connections in SHOW DATABASES, and the log for connection failures.

  6. Hunt the connection holders. If sv_active is at pool_size, run SHOW SERVERS and look for active connections with the oldest request_time. The link column maps each server connection to a client; cross-reference with SHOW CLIENTS to find the source address. On the PostgreSQL side, check pg_stat_activity for idle in transaction state. The signature of idle-in-transaction starvation is avg_xact_time far larger than avg_query_time.

  7. Check whether the backend is failing, not slow. If total server connections (sv_active + sv_idle + sv_used + sv_tested + sv_login) decline over successive polls while sv_login stays elevated, PgBouncer cannot establish new backend connections. Check SHOW DNS_HOSTS for stale or unresolvable addresses, test a direct connection from the PgBouncer host to PostgreSQL, and check whether PostgreSQL is at max_connections. Resizing the pool will not help this pattern.

  8. Estimate time to first casualty. Compare current maxwait against query_wait_timeout from SHOW CONFIG (default 120s) and against your application’s own timeout, whichever is shorter. That gap is how long you have before clients start erroring or retrying. PgBouncer logs a query_wait_timeout event when it disconnects a waiter, so grep the log to see whether casualties have already started.

Metrics and signals to monitor

SignalWhy it mattersWarning sign
maxwait / maxwait_us (SHOW POOLS)Age of the oldest waiter; the direct measure of user-facing queuing painSustained >5s; any approach toward query_wait_timeout
cl_waiting (SHOW POOLS)Queue depth per pool; required context for maxwaitNon-zero sustained beyond a traffic burst
sv_active vs pool_sizeLeading indicator: at 100%, the next request queuesRatio >85% sustained; 100% with waiters
sv_idleReady reserve; zero means one slow query away from a queue0 sustained, even with cl_waiting = 0
avg_wait_time (SHOW STATS_AVERAGES)Typical queuing delay PgBouncer injects; complements the maxwait worst caseSustained >100ms, or any creep above a zero baseline
avg_query_time vs avg_wait_timeSplits “waiting for pool” from “waiting for database”wait_time high while query_time is low
avg_xact_time vs avg_query_timeExposes idle-in-transaction connection hoardingxact_time many times larger than query_time
sv_loginBackend connection establishment healthConsistently >0 and rising, with cl_waiting growing
paused / disabled (SHOW DATABASES)Maintenance context that invalidates every other alertMust be checked before any escalation
Reserve pool usageOverflow activation means the base pool is undersizedServer connections above pool_size for >5 minutes
Log events: query_wait_timeout, connect failedOnly source of error evidence; no SHOW counters existAny query_wait_timeout events in production

Averaging caveat: SHOW STATS averages roll over the stats period and SHOW POOLS is a point-in-time snapshot, so sub-second queue spikes between polls are invisible. That is acceptable here; sub-second queuing is not the problem this article is about.

Fixes

If the backend is slow (high avg_query_time)

The pool is a symptom. Fix the queries: find the offenders via pg_stat_activity and pg_stat_statements on PostgreSQL, and cancel or terminate the worst blockers to free server connections. Coordinate before killing anything that might be a batch job. PgBouncer-side changes only shuffle the queue.

If the pool is undersized (low avg_query_time, sv_active = pool_size)

Raise pool_size (or default_pool_size) for the affected database and run RELOAD. The arithmetic: required pool size is roughly transactions_per_second x avg_xact_time_in_seconds. Respect the ceiling: the sum of all pool sizes across all PgBouncer instances targeting one PostgreSQL must stay comfortably below max_connections, leaving room for superuser and direct connections. Do not shrink pool_size because sv_idle looks high; in transaction mode, idle connections are the burst buffer, not waste.

If idle-in-transaction clients are hoarding connections

This is an application bug, not a PgBouncer tuning problem. Identify the client via SHOW SERVERS link and SHOW CLIENTS addr, and fix the code that opens a transaction and then does non-database work. As a safety net, PostgreSQL’s idle_in_transaction_session_timeout can auto-terminate these sessions, but that changes application-visible behavior, so roll it out deliberately.

If backend connections cannot be established

Do not touch the pool size. Fix reachability: verify PostgreSQL is up and below max_connections, check credentials in PgBouncer’s auth configuration, and check SHOW DNS_HOSTS for a stale address after a failover. Changing the backend host in pgbouncer.ini and running RELOAD opens fresh backend connections; an unchanged host does not clear the existing DNS cache immediately.

If reserve pool is absorbing the overflow regularly

The reserve pool (reserve_pool_size, default 0) exists for brief spikes: it only kicks in after a client has waited reserve_pool_timeout (default 5s). If it activates routinely, the base pool is chronically undersized. Raise pool_size instead of growing the reserve; when base plus reserve both fill, the queuing cliff is deeper.

On query_wait_timeout itself

The 120s default is far longer than most application timeouts, which means applications time out and retry long before PgBouncer ejects the waiter, amplifying the queue. Many operators lower query_wait_timeout to a value aligned with the application’s own timeout so that PgBouncer, not the application, enforces the queue limit. Tradeoff: a shorter timeout disconnects legitimate waiters during transient backend slowness instead of letting them ride it out. Change it with the application timeout in mind, not in isolation. Since PgBouncer 1.25.0, query_wait_notify sends a client-facing NOTICE after the configured queue wait (default 5 seconds; 0 disables it).

Prevention

  • Alert on sustained maxwait, not on cl_waiting > 0. Brief queuing during bursts is normal in transaction mode and makes cl_waiting > 0 a false-positive machine. The signal that distinguishes “burst” from “stuck” is maxwait above a threshold (5s is a reasonable starting point) sustained for a minute or more, with a paused/disabled check built into the alert condition.
  • Suppress alerts during administrative state. High cl_waiting with sv_active draining to zero is the exact signature of both a PAUSE and a real outage. Every PgBouncer alert must read the paused/disabled columns first.
  • Track headroom, not just pain. Trend sv_active / pool_size per pool. Above 85% sustained, act before the queue forms. Zero sv_idle with zero waiters is a yellow state, not green: you are one slow query from a cascade.
  • Baseline avg_wait_time and avg_xact_time. A creep from zero wait time, or a growing gap between transaction time and query time, are the early warnings that arrive weeks before the maxwait incident.
  • Align timeouts across layers. Application timeout, query_wait_timeout, and load balancer timeouts in front of PgBouncer should be a deliberate stack, not three independent defaults.
  • Watch capacity relationships. Sum of pool sizes versus PostgreSQL max_connections, and max_client_conn versus the file descriptor limit, are misconfigurations that turn a traffic peak into a maxwait incident.
  • Remember that stats reset on restart and that SHOW commands expose no error counters. Log collection for PgBouncer is not optional if you want query_wait_timeout events and connection failures after the fact.

How Netdata helps

  • Netdata collects PgBouncer pool metrics continuously through the admin console, so maxwait, cl_waiting, and per-pool server states become a time series instead of a snapshot you happened to catch during the incident.
  • Per-pool breakdowns show which (database, user) pool owns the queue while the aggregate still looks healthy.
  • Correlating client wait time with query time on the same dashboard makes the “pool too small” vs “database too slow” decision visual instead of a manual two-query comparison.
  • The gap between transaction time and query time, tracked over weeks, surfaces idle-in-transaction creep before it saturates a pool.
  • Alerting on sustained maxwait with anomaly detection on wait time catches slow-building cases that static cl_waiting thresholds miss, without paging on normal burst queuing.
  • Host-level metrics (per-core CPU for the single-threaded event loop, file descriptor usage) sit next to the pooler metrics, which matters when the root cause is PgBouncer itself rather than the pools.