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 · OPERATIONS PLAYBOOK

PgBouncer's quiet cliffs: a pool that queues, a front door that refuses, and a pooling mode that drops your session state

A single-threaded connection multiplexer that shares a small set of PostgreSQL connections across many clients. One event loop on one core, one FIFO wait queue per (database, user) pool, and a transaction-pooling mode that silently breaks prepared statements, temp tables, and session variables. We trace how that design behaves under load, where it turns from efficient into an outage, and what to do when it does.

"

PgBouncer's defaults get connection pooling working in minutes, then hand you a set of cliff-edges that most teams only discover during an incident.

The defaults work. Until a burst of slow queries holds every server connection, clients pile into the FIFO wait queue, cl_waiting climbs, and applications start timing out and retrying — a thundering herd that grows the queue faster than it can drain. Until max_client_conn is reached and new connections are refused instantly with no more connections allowed. Until someone switches to transaction pooling for efficiency and the application starts throwing prepared statement "..." does not exist under load. Until a client runs BEGIN, wanders off to do other work, and holds a pool slot idle-in-transaction while everyone else waits. Until a PostgreSQL failover leaves PgBouncer's DNS cache pointing at the dead primary.

These guides are written for engineers who already run PgBouncer, not for people learning what connection pooling is. The goal is the mental model of how the pooler actually behaves under load, the failure patterns that keep recurring, the monitoring story that catches them before they page anyone, and the runbooks you wish someone had handed you before your last incident. PgBouncer is a proxy, not a database — monitor it the way you monitor HAProxy or nginx, and remember it has zero error counters, so its errors live only in the log.

How PgBouncer actually runs in production

PgBouncer is not a database. It is a single-threaded event loop that accepts client connections, authenticates them, and multiplexes them onto a much smaller set of PostgreSQL connections through a per-pool FIFO wait queue. The pool mode decides when a server connection is handed back. Most production failures live between these layers — in the queue, in the mode, or in the single thread — not inside PostgreSQL.

01
application clients
Each application connection is one client socket. In transaction mode a client only holds a server connection while it has work; between transactions it is <code>cl_active</code> but attached to nothing. When every server connection is busy, new client requests become <code>cl_waiting</code>. The hard ceiling is <code>max_client_conn</code> — reached, and new connections are refused, not queued.
CLIENT
02
listener + authentication
PgBouncer accepts the socket, runs the TLS handshake if configured, and authenticates the client against its own <code>auth_file</code> or an <code>auth_query</code> run on PostgreSQL. Auth failures and refusals close the connection immediately and appear only in the log — never in a <code>SHOW</code> counter.
AUTH
03
event loop (single thread)
One <code>libevent</code> loop on one core drives every client socket, every server socket, every DNS lookup, and every admin command. Its strength is tiny overhead (~2KB per idle connection); its constraint is that one slow synchronous operation freezes every pool at once. Socket buffers (<code>pkt_buf</code>) are where backpressure lives.
LOOP
04
connection pools + wait queue
One pool per unique <code>(database, user)</code> pair, each sized by <code>pool_size</code>. When all server connections are busy, clients enter a FIFO queue; the oldest waiter's age is <code>maxwait</code>. <code>reserve_pool_size</code> adds overflow only after a client has waited past <code>reserve_pool_timeout</code>.
POOL
05
pool mode
The most consequential setting. <code>session</code> holds a server connection for the whole client session; <code>transaction</code> returns it after each transaction (high multiplexing, but prepared statements, temp tables, <code>SET</code>, advisory locks and <code>LISTEN/NOTIFY</code> break); <code>statement</code> returns it after each statement. The mode decides how long a server connection is held per client.
MODE
06
server connections
Backend connections cycle through states: <code>sv_active</code> (serving a client), <code>sv_idle</code> (ready inventory), <code>sv_used</code> (returned, awaiting a health check), <code>sv_tested</code> (running <code>server_check_query</code>), <code>sv_login</code> (authenticating). Created on demand up to <code>pool_size</code>, recycled after <code>server_lifetime</code>, reset with <code>server_reset_query</code> (<code>DISCARD ALL</code>).
SERVER
07
PostgreSQL backend
Every server connection consumes one <code>max_connections</code> slot on PostgreSQL. The sum of all pools' <code>pool_size</code> across every PgBouncer instance must fit under that limit. Backend hostnames are resolved through PgBouncer's own DNS cache (<code>dns_max_ttl</code>) — stale entries survive a failover and quietly break new connections.
BACKEND

Why this matters: 'PgBouncer is slow' or 'the app can't connect' can come from a saturated pool with clients queuing, a hit max_client_conn ceiling refusing connections, file-descriptor exhaustion, an idle-in-transaction slot leak, a stalled single thread, a slow backend holding connections longer, a pool-mode mismatch corrupting session state, or a stale DNS cache after failover. The symptom rhymes but each layer has a different signal — and a different fix.

The failures you'll actually see

Most PgBouncer incidents fall into a small set of recurring patterns. Recognise the shape, and triage gets dramatically faster.

CRITICAL

The pool exhaustion cascade

Slow queries or long transactions hold every server connection, sv_active hits pool_size, sv_idle falls to zero, and new client requests enter the FIFO queue. cl_waiting and maxwait climb. Application timeouts fire below PgBouncer's query_wait_timeout, clients retry, and each retry adds a waiter — a thundering herd that grows the queue exponentially until max_client_conn is hit and connections are refused.

  • sv_active = pool_size and sv_idle = 0 on the affected pool
  • cl_waiting growing, maxwait rising toward query_wait_timeout
  • avg_wait_time climbing while avg_query_time may also be elevated
  • query_wait_timeout disconnects appearing in the log
Investigate
CRITICAL

Backend connection failure

PgBouncer cannot establish or authenticate new connections to PostgreSQL — the backend is down, unreachable, at max_connections, or the credentials/auth_type do not match. sv_login stays elevated while sv_idle drains and no new sv_active connections appear. The pool empties and every client queues until query_wait_timeout fires. The evidence is in the log, not in a SHOW counter.

  • sv_login elevated or fluctuating, sv_idle declining
  • Total server connections (active + idle + used) falling over time
  • Log: closing because: server login failed / connect failed
  • cl_waiting growing with no new sv_active connections
Investigate
CRITICAL

The client limit hit

PgBouncer reaches max_client_conn and rejects every new connection instantly with no more connections allowed (max_client_conn) — no queue, unlike pool exhaustion. The pool itself can be perfectly healthy with sv_active well below pool_size; clients simply cannot get through the front door. Usually an application connection leak, an uncoordinated deployment adding pools, or max_client_conn set higher than the file-descriptor limit.

  • Log: no more connections allowed (max_client_conn)
  • free_clients at zero in SHOW LISTS
  • sv_active well below pool_size (pool is healthy)
  • Application connection-refused errors spiking
Investigate
ACTIVE

Idle-in-transaction starvation

In transaction mode a client runs BEGIN, acquires a server connection, then does non-database work (HTTP calls, computation) before committing — holding a pool slot idle the whole time. Enough such clients make every server connection active but actually idle, starving everyone else. The hallmark is avg_xact_time far exceeding avg_query_time; PostgreSQL shows the matching backends as idle in transaction.

  • avg_xact_time >> avg_query_time (ratio 10x or more)
  • sv_active near pool_size with cl_waiting > 0
  • pg_stat_activity backends in state = idle in transaction
  • SHOW SERVERS active connections with old request_time
Investigate
ACTIVE

The pool-mode mismatch

PgBouncer runs in transaction pooling mode but the application relies on session state — prepared statements, temp tables, SET variables, advisory locks, LISTEN/NOTIFY. When a server connection is reassigned between transactions, that state is gone. The application throws prepared statement "..." does not exist or silently reads the wrong data. Every PgBouncer metric looks healthy; the errors are SQL-level and only appear under concurrent load.

  • Errors: prepared statement "..." does not exist
  • Missing temp tables or lost SET / search_path context
  • Only under concurrency — single-user testing passes
  • PgBouncer metrics healthy: no queuing, no wait time
Investigate
IMMINENT

File descriptor exhaustion

PgBouncer needs roughly two file descriptors per proxied connection plus admin, listen, DNS and log FDs. When max_client_conn is set higher than the OS ulimit, or the ulimit was never raised, PgBouncer hits the ceiling below its configured client limit — refusing connections with Too many open files, unable to open new server connections, and sometimes losing its log FD and crash-looping.

  • Log / dmesg: Too many open files (EMFILE)
  • used_clients plateaus below max_client_conn but connections refused
  • Open FD count near the limit in /proc/PID/limits
  • Short PgBouncer uptime (crash-restart loop)
Investigate
Choosing a tool

Best PgBouncer Monitoring Tools (2026)

A ranked review of the tools teams actually shortlist here, what each one is genuinely good at, and how the pricing behaves as you scale.

PgBouncer monitoring maturity levels

PgBouncer observability works in four practical levels. Each is a complete operation, not a stepping stone. Pick the level that matches how much your pooler matters. Because PgBouncer is usually a single point of failure in front of PostgreSQL, most production deployments should land at the second level.

Level 1: Survival

Know that something is wrong

Survival monitoring is the floor. With these signals you can answer one question: is PgBouncer alive, and is anyone stuck waiting for a connection? You will not learn what broke, but you will learn that something broke before the application does. Survival is enough for non-critical poolers.

  • Process liveness (functional) SHOW VERSION over the admin console, not just a port check — the loop can stall while listening.
  • cl_waiting per pool The single most important signal: is anyone blocked waiting for a server connection?
  • maxwait per pool How long the oldest waiter has been blocked — the real user-facing pain.
  • free_clients (SHOW LISTS) How close you are to max_client_conn; zero means new connections are refused.
  • Log tail for error keywords auth failed, no more connections allowed, timeout — PgBouncer's errors live only here.

Level 2: Operational

Diagnose most incidents on your own

Operational monitoring is what most production deployments should target. Survival tells you something is wrong; operational tells you what. With this coverage your team can usually diagnose an incident on its own: saturation, injected latency, backend slowdown, client-limit pressure, connection-establishment health.

  • sv_active / pool_size per pool The leading saturation indicator; warns before cl_waiting appears.
  • sv_idle per pool Available headroom; zero idle with zero waiters is still the cliff edge.
  • avg_wait_time The latency PgBouncer itself is injecting; sub-millisecond when well-sized.
  • avg_query_time Backend responsiveness seen through the pooler; rises before queuing.
  • avg_xact_time Transaction hold time; far above query time means idle-in-transaction.
  • used_clients / max_client_conn Proximity to the hard client ceiling; at 100% connections are refused.
  • File descriptor usage vs ulimit Cliff-edge: at the FD limit PgBouncer refuses connections regardless of max_client_conn.
  • Process CPU (single core) One thread on one core; measure per-process, not system-wide.

Level 3: Mature

Catch problems before they become incidents

Mature monitoring catches problems before they wake anyone up. Per-pool saturation hidden by a healthy aggregate, backend connections failing to establish, the event loop straining, stuck server connections aging in place, DNS drifting after a failover. None of these page you on day one — they become the incident on day thirty.

  • sv_login per pool Backend connection-establishment health; sustained > 0 means logins are slow or failing.
  • Admin-console latency The meta-signal: a slow admin console means the single event loop is straining.
  • avg_xact_time / avg_query_time ratio The idle-in-transaction ratio; the gap is the application holding connections idle.
  • Per-pool utilization (not aggregate) One pool at 100% while others idle is invisible in the global average.
  • SHOW SERVERS request_time aging The oldest active connection is the one holding up the pool.
  • DNS resolution (SHOW DNS_HOSTS) Which IP each backend resolves to; stale entries survive a failover.
  • Connection refusal rate (log) No SHOW counter exists — derive it from no more connections allowed lines.
  • Timeout events by type (log) query_wait_timeout vs client_idle_timeout vs server_login_timeout mean different things.

Level 4: Expert

Reactive instrumentation after real incidents

Expert signals enter your stack the day after a specific incident proved you needed them. Recycling waves, memory fragmentation, wait-time versus real application latency, auth-query contention, TLS handshake overhead. Most teams never need every signal here. Add the ones your incident history says you do.

  • server_lifetime recycling waves Connections created together recycle together, causing periodic capacity dips.
  • SHOW MEM allocator state Slab-allocator fragmentation on long-running instances; RSS should track connection count.
  • avg_wait_time vs app P95/P99 Confirm PgBouncer's queuing is actually the bottleneck, not the network or app.
  • pg_stat_activity cross-correlation Match PgBouncer sv_active with PostgreSQL's view; mismatches reveal stuck state.
  • auth_query latency Under load the auth query itself becomes a bottleneck and a bootstrap loop.
  • server_check_query execution time Slow health checks back up the used/tested validation pipeline.
  • TLS handshake rate and duration For TLS-heavy deployments, handshake overhead drives single-core CPU saturation.
  • Reserve pool activation events Reserve capacity activating means the base pool_size was exhausted — track every event.

Operating mistakes worth avoiding

The traps PgBouncer teams keep falling into. Each has a clear, well-known fix. Most teams only learn it after an incident.

Not monitoring cl_waiting at all

Teams watch process up/down and connection counts but never look at <code>cl_waiting</code>, so they miss connection starvation entirely — clients wait silently until <code>query_wait_timeout</code> fires after two full minutes. <code>cl_waiting</code> (paired with sustained <code>maxwait</code>) is the single most important PgBouncer signal. Monitoring utilization without it tells you the pool is full but not whether anyone is being hurt.

Confusing wait time with query time

Operators see high latency and blame PostgreSQL, but <code>avg_query_time</code> is 5ms while <code>avg_wait_time</code> is 2000ms — the database is fast, the pool is just too small. The reverse also happens. Always read <code>avg_wait_time</code> (pool queuing), <code>avg_query_time</code> (backend execution), and <code>avg_xact_time</code> (hold time) together before deciding whether to raise <code>pool_size</code> or fix the backend.

Setting max_client_conn without checking FD limits

Setting <code>max_client_conn = 10000</code> while leaving the OS <code>ulimit</code> at 1024 means PgBouncer accepts a few hundred clients then refuses the rest with <code>Too many open files</code>, or silently lowers the limit at startup. The effective ceiling is the file-descriptor limit minus server connections and overhead — raise <code>LimitNOFILE</code> to at least <code>max_client_conn x 2 + 500</code> and restart.

Assuming idle server connections are wasted

Seeing <code>sv_idle > 0</code> and thinking 'wasted resources', teams cut <code>pool_size</code>. In transaction mode idle connections are the ready inventory that absorbs bursts; shrinking the pool removes burst capacity and accelerates the path to queuing. <code>sv_idle</code> is not waste — a pool with zero idle and zero waiters is already at the cliff edge, one slow query from a cascade.

Not detecting idle-in-transaction

The number-one silent killer in transaction mode: an application holds a transaction open while doing non-database work, consuming a pool slot for the whole duration. There is no PgBouncer alert for it — you derive it from <code>avg_xact_time</code> far exceeding <code>avg_query_time</code>, or from PostgreSQL backends in <code>idle in transaction</code> state. Set <code>idle_in_transaction_session_timeout</code> and fix the <code>BEGIN</code>/<code>COMMIT</code> pattern.

Ignoring the paused/disabled state in alerts

During a planned <code>PAUSE</code> (for a PostgreSQL upgrade, say) <code>cl_waiting</code> spikes and <code>sv_active</code> drops to zero — metrics identical to a real outage. Every PgBouncer saturation alert must check the <code>paused</code>/<code>disabled</code> flags from <code>SHOW DATABASES</code> and suppress during maintenance, or the on-call gets paged for routine work. Remember a <code>PAUSE</code> without a matching <code>RESUME</code> freezes traffic with no timeout.

Switching pool modes without auditing the app

Moving to transaction pooling for better multiplexing without checking the application for session-dependent features breaks prepared statements, temp tables, <code>SET</code> variables, advisory locks and <code>LISTEN/NOTIFY</code> — silently, intermittently, only under concurrent load. Single-user testing passes because the same server connection is reused. Audit the code (or use <code>max_prepared_statements</code> on 1.21+) before flipping the mode.

Treating SHOW STATS as an error signal

PgBouncer has zero error counters in any <code>SHOW</code> command — no auth-failure count, no connection-rejection count, no timeout count. Authentication failures, <code>no more connections allowed</code> refusals, and <code>query_wait_timeout</code> disconnects are visible only in the log. Any monitoring strategy that scrapes <code>SHOW</code> commands and ignores the log is blind to every error condition PgBouncer produces.

PgBouncer runbooks in this section

Each guide is a focused runbook for one symptom or topic. Pick one when you have an incident, or use the categories to learn the area.

WHERE TO GO NEXT

Setting up PgBouncer monitoring, or putting out a fire?

If you're starting from scratch, the monitoring checklist is the path of least regret. If you're mid-incident, jump straight to the symptom that matches what you're seeing.