intermediate
Slow, and Nothing Is Busy
Read the evidence before you read the options. The signals are presented the way a dashboard would present them — nothing is labelled with the answer.
The report
The inventory service started timing out during the afternoon peak. It clears up by evening. The on-call engineer says "all the graphs are green" and has been restarting instances, which helps for about ten minutes.
The system
Inventory API — during the afternoon peakILLUSTRATIVE
| Signal | Value | What it tells you |
|---|---|---|
| App CPU | 14% | The application instances are mostly idle. |
| p99 latency | 4.8 s (target 300 ms) | The slowest 1% of requests take sixteen times the target. |
| Error rate | 2.1% (client timeouts) | Roughly one request in fifty exceeds the client timeout. |
| Connection pool in use | 17 of 40 | Fewer than half the available connections are checked out. |
| Pool acquire wait (p99) | 3 ms | Requests get a connection almost immediately. |
PostgreSQL — same windowILLUSTRATIVE
| Signal | Value | What it tells you |
|---|---|---|
| DB CPU | 22% | The database server has substantial idle capacity. |
| Disk read I/O | 18 MB/s (capacity ~500 MB/s) | Storage is barely being touched. |
| Query execution time (p99) | 11 ms | Once a query starts running, it finishes quickly. |
| Statement duration (p99) | 4.6 s | The total time a statement occupies a session is four hundred times its execution time. |
| Sessions in `LockWaitEvent` | 31 average, peak 94 | Dozens of sessions are simultaneously in a wait state rather than executing. |
| Deadlocks | 0 | No deadlocks are being detected or rolled back. |
Sample of blocked sessions, captured at 14:41
pid state wait_event duration query 28841 active — 00:00:00.9 UPDATE stock SET qty = qty - $1 WHERE sku = $2 28855 idle in transaction ClientRead 00:00:04.4 (last: SELECT ... FROM stock WHERE sku = $1 FOR UPDATE) 28857 active transactionid 00:00:04.1 UPDATE stock SET qty = qty - $1 WHERE sku = $2 28861 active transactionid 00:00:03.8 UPDATE stock SET qty = qty - $1 WHERE sku = $2 28863 active transactionid 00:00:03.7 UPDATE stock SET qty = qty - $1 WHERE sku = $2 ... (27 more sessions waiting on transactionid, all touching sku = 'SKU-11402')
What is the constraint?