- Inspect
- Diagnose
- Apply fix
- Verify
Your mission
orders-api intermittently reports remaining connection slots are reserved while PostgreSQL CPU stays low.
- workload
- postgres/orders
- status
- saturated
- symptom
- 98 of 100 connections are occupied
Current objective
Measure connection pressure by application and state before increasing any limit.
Show a hint
Try: psql -c 'select application_name,state,count(*) from pg_stat_activity group by 1,2;' Bounded pool settings
DB_POOL_MAX: "15" DB_IDLE_TRANSACTION_TIMEOUT: "60s"
Restart clears this attempt. Completed labs are remembered in this browser.
Incident review
PostgreSQL has connection headroom again.
The API pool is bounded across replicas and abandoned transactions are no longer accumulating.
Lesson
Treat database connections as a shared capacity budget. Size pools across all replicas, preserve operator headroom, and use transaction timeouts as a guardrail—not as a substitute for fixing transaction lifecycle bugs.
Choose another scenarioCommand transcript
Your commands and their output will appear here.
Edit configmap/orders-api-db
Bound the pool per replica and ensure abandoned transactions are closed.