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-avg-wait-time-high ▌

Operations Guides

PgBouncer avg_wait_time high: the latency the pool itself is injecting

Your application latency is up, PostgreSQL looks fine, and then PgBouncer’s stats show avg_wait_time at tens or hundreds of milliseconds. That number answers “where did the latency come from”: it is time clients spent queued inside PgBouncer waiting for a server connection, before their query even reached PostgreSQL.

avg_wait_time is purely PgBouncer-induced latency. A direct connection to PostgreSQL would not have it. When it is high, the pool is not keeping up with demand, and every queued client pays that delay on top of normal query execution time.

This guide covers how to read the metric correctly (including a version difference that changes what the number means), how to tell pool queuing apart from backend slowness, and how to fix the root cause rather than just widening the pool.

What this means

avg_wait_time comes from SHOW STATS and SHOW STATS_AVERAGES, measured in microseconds, averaged over the stats period (stats_period, default 60 seconds). It is the average time clients spent in the FIFO wait queue before being assigned a server connection.

Interpretation bands:

  • Sub-millisecond: healthy. Clients are assigned server connections essentially instantly.
  • Sustained above 10ms: the pool is routinely saturated. Queuing happens often enough to show up in the average.
  • Above 100ms (100,000 microseconds) sustained: visible application latency. If your application has a 200ms response budget, 100ms of queue wait has consumed half of it before the query starts.

Three properties matter before you act on this metric:

  1. It is an average, and averages hide bursts. High traffic volume dilutes a few very slow waiters. You can see avg_wait_time = 5ms while the P99 wait during a burst was 500ms. PgBouncer exposes no percentiles.
  2. It can be skewed by timed-out clients. Clients that wait until query_wait_timeout (default 120s) and get disconnected have their entire wait accumulated into the stats. A handful of timed-out waiters can drag the average up even if most clients were served quickly.
  3. The calculation changed in PgBouncer 1.23.0. Before 1.23.0 (July 2024), avg_wait_time was total accumulated wait time divided by the wall-clock duration of the stats period, not by the number of clients served. One client waiting 10 minutes would report roughly 10 seconds of “average” wait time in the period it was finally assigned a backend, regardless of what any other client experienced. The reported value had little relation to what a typical client waited. 1.23.0 made it a true per-client average (total wait divided by server_assignment_count). If you are on an older version, treat avg_wait_time as unreliable and lean on maxwait from SHOW POOLS instead. See the 1.23.0 changelog entry and PR #727 for details.

One check before anything else: confirm the database is not administratively paused. During PAUSE, cl_waiting spikes and wait times climb by design. Every PgBouncer alert and every diagnosis should start with SHOW DATABASES and the paused / disabled columns.

Common causes

CauseWhat it looks likeFirst thing to check
Pool too small for the workloadsv_active = pool_size, sv_idle = 0, cl_waiting > 0, low avg_query_timeCompare sv_active to pool_size in SHOW POOLS
Backend slowdown (slow queries)avg_query_time elevated, connections held longer, queue buildsavg_query_time vs baseline in SHOW STATS_AVERAGES
Idle-in-transaction holding connectionsavg_xact_time much larger than avg_query_time, sv_active high with little actual query workRatio of avg_xact_time to avg_query_time; SHOW SERVERS for old request_time
Long-running transactions or batch jobsSustained queue during batch windows, clears afterSHOW SERVERS active connections with old request_time
Backend connection failuresv_login elevated, total server connections declining, queue growingsv_login in SHOW POOLS, PgBouncer log for “login failed” / “connect failed”
Reserve pool masking chronic undersizingTotal server connections regularly exceed pool_sizeCompare summed sv_* counts against pool_size; log shows “taking connection from reserve_pool”
Event loop saturation (single-threaded CPU)All pools slow at once, admin console sluggish, process at 100% of one coretop / ps on the PgBouncer process; time an admin command
Pre-1.23.0 metric artifactHuge avg_wait_time that does not match observed client experiencePgBouncer version; cross-check with maxwait in SHOW POOLS

Quick checks

All commands run against the PgBouncer admin console and are read-only.

# Check administrative state first: paused or disabled databases
psql -h /var/run/postgresql -p 6432 -U pgbouncer pgbouncer -Atc "SHOW DATABASES;"

# Current per-database averages: wait_time, query_time, xact_time (microseconds)
psql -h /var/run/postgresql -p 6432 -U pgbouncer pgbouncer -Atc "SHOW STATS_AVERAGES;"

# Who is waiting right now, and how long has the oldest waiter been blocked
psql -h /var/run/postgresql -p 6432 -U pgbouncer pgbouncer -Atc "SHOW POOLS;"
# cl_waiting, sv_active, sv_idle, sv_login, maxwait, maxwait_us per pool

# Per-client wait times: find the worst current waiters
psql -h /var/run/postgresql -p 6432 -U pgbouncer pgbouncer -Atc "SHOW CLIENTS;"
# state, wait, wait_us per client

# Which server connections are holding the pool: oldest active request_time
psql -h /var/run/postgresql -p 6432 -U pgbouncer pgbouncer -Atc "SHOW SERVERS;"

# Event loop health: time a trivial admin command
time psql -h /var/run/postgresql -p 6432 -U pgbouncer pgbouncer -c "SHOW LISTS;" > /dev/null

# Process CPU: is the single thread saturated
ps -p $(pgrep -f pgbouncer) -o %cpu,rss

# Log: wait timeouts and connection failures are log-only signals
grep -E "query_wait_timeout|login failed|connect failed" /var/log/pgbouncer/pgbouncer.log | tail -20

Two caveats. Column positions in SHOW STATS are version-dependent (1.23 added server_assignment_count, 1.24 added prepared statement counters), so reference columns by name or use SHOW STATS_AVERAGES for the simpler layout. And there are no error counters in any SHOW command; timeouts, rejections, and login failures only exist in the log.

How to diagnose it

The core question is: pool problem or backend problem? Three signals answer it.

flowchart TD
  A[avg_wait_time high] --> B{Database paused or disabled?}
  B -- yes --> C[Expected: maintenance state. RESUME when done]
  B -- no --> D{cl_waiting greater than 0 now?}
  D -- no --> E[Burst already drained or pre-1.23 metric artifact. Check maxwait and version]
  D -- yes --> F{avg_query_time elevated?}
  F -- yes --> G[Backend is slow: connections held longer, pool starves. Fix PostgreSQL]
  F -- no --> H{avg_xact_time much greater than avg_query_time?}
  H -- yes --> I[Idle-in-transaction: app holds connections without querying. Fix app]
  H -- no --> J[Pool undersized or CPU-bound event loop. Check sv_active vs pool_size and process CPU]
  1. Rule out maintenance. SHOW DATABASES: if paused = 1 or disabled = 1, the queuing is intentional. Do not escalate.
  2. Confirm live queuing. SHOW POOLS: cl_waiting > 0 means clients are blocked right now, and maxwait is the age of the oldest waiter. If cl_waiting is zero but avg_wait_time was high, the burst already drained, or you are on a pre-1.23.0 version looking at a distorted average. Cross-check with maxwait and your version.
  3. Split pool latency from backend latency. Compare avg_wait_time against avg_query_time in SHOW STATS_AVERAGES. High wait with normal query time means PostgreSQL is fast and the pool is the bottleneck. High query time means PostgreSQL is slow, connections are held longer, and the queue is a symptom. This split is the most common misdiagnosis: teams see latency, blame the database, and the database was at 5ms while the queue was at 2000ms.
  4. Check for idle-in-transaction. If avg_xact_time is far larger than avg_query_time (a 10x gap is a strong signal), clients are holding server connections while doing non-database work. Confirm in SHOW SERVERS (active connections with old request_time) and on PostgreSQL itself (pg_stat_activity rows in idle in transaction state).
  5. Identify the culprits. In SHOW SERVERS, find active connections with the oldest request_time; follow the link column to SHOW CLIENTS to get the source address of the application holding them.
  6. Check supply. Is sv_active pinned at pool_size with sv_idle = 0? If yes, demand exceeds the pool. Also sum the sv_* columns against pool_size: if the total regularly exceeds it, the reserve pool is being drawn, which means the base pool has been undersized for a while.
  7. Check the event loop. If all pools degrade together and the admin console itself is slow (over ~200ms for a trivial SHOW), look at process CPU. PgBouncer is single-threaded; at 100% of one core (often from TLS handshakes or connection churn) everything queues behind the event loop, not just behind the pool.
  8. Check the log for query_wait_timeout. Each occurrence confirms a client waited the full timeout (default 120s) and was disconnected. These waits also inflate avg_wait_time, so their presence changes how you read the average.

Metrics and signals to monitor

SignalWhy it mattersWarning sign
avg_wait_time (SHOW STATS / STATS_AVERAGES, microseconds)The queuing delay PgBouncer adds per clientSustained >10ms; >100ms is user-visible
cl_waiting (SHOW POOLS)Clients blocked right now, per poolAny value sustained over 60s, not paused
maxwait / maxwait_us (SHOW POOLS)Age of the oldest waiter: worst-case pain, and the reliable wait signal on pre-1.23.0>5s impacting users; approaching query_wait_timeout means disconnects imminent
avg_query_time (microseconds)Backend speed as PgBouncer sees it; separates pool latency from database latencySustained >2x baseline
avg_xact_time (microseconds)How long connections are held per transactionRatio to avg_query_time >10x suggests idle-in-transaction
sv_active vs pool_sizePool utilization; 100% means the next client queues>85% sustained
sv_loginBackend connection establishment healthPersistently >0, especially with rising cl_waiting
server_assignment_count (1.23+)Pool turnover rate; also the denominator of the fixed avg_wait_timeDrops while query rate stays flat: clients waiting instead of being assigned
query_wait_timeout events (log only)Confirms waiters sat the full timeout and were droppedAny occurrence in production

Fixes

Backend is slow (avg_query_time elevated)

The queue is a symptom. Fix PostgreSQL: find the slow queries (pg_stat_statements), lock contention, or I/O saturation. If specific long-running queries are identifiable and safe to cancel, canceling them on the PostgreSQL side frees server connections immediately. Coordinate with the owning team first; killing a query is disruptive to whoever ran it. Raising pool_size here is the wrong move: it just sends more concurrent load to an already struggling backend.

Idle-in-transaction (avg_xact_time » avg_query_time)

This is an application fix, not a PgBouncer fix. Find the clients via SHOW SERVERS link to SHOW CLIENTS, then fix the code path that opens a transaction and does non-database work before committing. As a guardrail, PostgreSQL’s idle_in_transaction_session_timeout can auto-terminate these sessions; clients get an error, so roll it out deliberately.

Pool genuinely undersized

Increase pool_size (per-database override or default_pool_size) and run RELOAD. Constraints to respect: the sum of all pools across all PgBouncer instances targeting one PostgreSQL must fit within that server’s max_connections with headroom for superuser and direct connections (keep pool capacity under ~80% of it). If reserve_pool_size > 0 and the reserve is drawn regularly, treat that as proof the base pool has been undersized; size the base pool so the reserve is only touched by genuine spikes.

Event loop saturated

If CPU on the single thread is the limit, scaling the pool does nothing. The supported path is multiple PgBouncer processes sharing the port via so_reuseport, each with independent pools and stats (monitoring must aggregate across them). Offloading TLS termination to a layer in front of PgBouncer also cuts CPU sharply if TLS handshakes are the driver.

Clients timing out and retrying

If application timeouts are shorter than query_wait_timeout, applications give up and retry while their original requests still hold queue slots, amplifying the queue. Align the timeouts, and make sure retries back off rather than stampede.

Prevention

  • Alert on the right combination. cl_waiting > 0 sustained, with maxwait above your application tolerance, and the database not paused. Raw cl_waiting > 0 pages on harmless bursts; avg_wait_time alone lags and averages over bursts.
  • Baseline the wait/query/xact trio. The diagnostic split only works if you know normal. Track avg_wait_time, avg_query_time, and avg_xact_time per database over time and alert on deviation from baseline, not just absolute thresholds.
  • Watch headroom, not just pain. sv_idle = 0 with cl_waiting = 0 is one slow query away from a cascade. Trend sv_active / pool_size; above 85% sustained, grow capacity before the cliff.
  • Upgrade to 1.23.0 or later. The pre-1.23.0 avg_wait_time calculation is misleading enough to hide real saturation and invent fake saturation. On older versions, alert on maxwait instead.
  • Size against PostgreSQL. Re-derive the pool-size budget whenever you add PgBouncer instances or application capacity, and keep total pool capacity below 80% of PostgreSQL max_connections.
  • Audit for idle-in-transaction in application code, especially ORM transaction scoping, before it shows up as a queue.

How Netdata helps

  • Netdata collects PgBouncer stats per database and graphs avg_wait_time alongside avg_query_time and avg_xact_time, so the “pool or backend” split is one glance instead of three admin-console queries during an incident.
  • Per-second sampling of cl_waiting and maxwait catches short queuing bursts that a 60-second stats_period average smooths away.
  • Server connection state breakdowns (sv_active, sv_idle, sv_login) per pool make it visible when one (database, user) pool saturates while the aggregate looks fine.
  • Process-level CPU per core exposes single-thread event loop saturation, the cause that pool tuning cannot fix.
  • Historical retention lets you compare today’s wait-time baseline against last week’s, which is how you catch slow creep before it becomes a queue.