Skip to content
Go back

PostgreSQL has no connections left

Find an oversized application pool and idle transactions before they turn connection pressure into an outage.

The incident you will investigate

This lab runs in a simulated terminal in your browser. No account, cloud resources, or live cluster is required. Inspect the evidence, diagnose the cause, apply a fix, and verify the result.

environment
production database
workload
postgres/orders
status
saturated
symptom
98 of 100 connections are occupied

What you will practice

orders-api intermittently reports remaining connection slots are reserved while PostgreSQL CPU stays low.

Measure connection pressure by application and state before increasing any limit.

Try: psql -c 'select application_name,state,count(*) from pg_stat_activity group by 1,2;'

Related labs