Build1 distinct publisher3 min readUpdated
A backend service slid from 80-120ms to 8-12s every few hours while tests stayed green and CPU stayed flat. The fix began with refusing to ship anyone's theory.
The Engineer · Build desk
Compiled by The EngineerSomething wrong?How this is made
The arithmetic in that single trace is the entire investigation. Application processing came to roughly 70ms, the database to about 20ms, external calls looked normal, and the client waited nearly ten seconds [7]. So about 90ms of accounted work sat inside a 10,000ms request: something close to 0.9 percent of the wall clock had any instrumentation pointed at it, and roughly 9.9 seconds did not [18].
Every theory in the room before the trace was a theory about that 0.9 percent [5]. An index makes the 20ms smaller. A garbage collection tuning pass works on the 70ms. More application logs describe the 70ms in greater detail. None of them reach the interval where the request was actually sitting, which is why the first pass through recent commits, queries, serialization, background jobs, caching and new endpoints found nothing suspicious [4].
What it was: under certain traffic patterns connections were not returned to the pool quickly enough, the pool occasionally exhausted, and new requests waited for one to free up [8]. That failure mode is self-clearing, which is why it presented as something periodic and mysterious that recovered without anyone touching it [2]. It is also why the GC guess was reasonable in shape and wrong in location. Both look like a slowdown on a timer.
The number that separates the two problems is the gap between execution and admission. A query taking 15ms can sit inside a request taking ten seconds [9], which is about 667 times more time spent waiting to start than doing the work [19]. From the user's chair that is indistinguishable from a slow query, and from the engineering side the two share no code path.
The repair was a connection lifecycle correction, a pool configuration change, and a new metric on connection acquisition time [10]. Before that, the only database timing collected was query execution [11]. The author's claim is that the acquisition metric would have exposed the problem almost immediately [12], and the structure of the trace supports it: an entire queue stage existed with no clock on it.
Worth noting what the write-up does not contain. It gives the baseline of 80-120ms and the incident range of 8-12s, a hundredfold degradation at both ends of the band [3][17], but it publishes no post-fix latency distribution, so the recovery is asserted rather than shown. The generalisation about who solves this is the author's own: in interviews, junior engineers name technologies while senior ones ask where the latency lives, whether it hits every endpoint, whether it tracks traffic, and whether some pool of connections, threads, sockets or workers is being exhausted [13][14]. Treat that as one practitioner's hiring heuristic, not evidence.
The transferable part is narrower than "add observability". A machine can be nearly idle while its users experience terrible latency, because the system is not computing, it is waiting [15][16]. Almost every dashboard measures work. The interesting seconds accumulate at the handoffs where work has not started yet, and those need their own clocks.
Follow any of these and your For You feed starts watching them — no settings page required.
Ranked by verification strength, evidence, and original report placement.
Under certain traffic patterns connections were not being returned to the connection pool quickly enough; the pool occasionally became exhausted and new requests waited for a free connection.
The fix was to correct the connection lifecycle, adjust pool configuration, and add metrics around connection acquisition time.
The service looked healthy by every routine signal: tests were green, CPU usage was normal, memory looked fine, and no obvious exceptions appeared in the logs.
Every few hours requests suddenly slowed down without failing, and then the system recovered by itself.
The API normally responded in around 80-120 ms; during the problem some requests took 8-12 seconds.
The team's first pass reviewed recent commits and checked database queries, serialization, background jobs, caching and a few recently added endpoints; nothing looked suspicious.
Evidence-backed comparisons of source perspectives and observed adoption signals. Read the methodology
Which Builder, Operator, and Investor concerns the observed source mix emphasized—not a truth score.
Evidence, demonstrated adoption, hype gap, incentives, and confidence are assessed independently, each on its own current evidence. How these are measured.
Single-source first-person retrospective with specific but unverifiable numbers
All claims rest on one undated dev.to narrative by one participant. The internal detail is specific and self-consistent (latency bands, per-layer trace breakdown, 15 ms query versus 10 s request, connection pool exhaustion as mechanism), and the mechanism is a well-known saturation pattern, which lifts it above pure assertion. But there are no traces, dashboards, percentile data, configuration values, incident dates, named technologies, or post-fix measurements, no second publisher, and the two most general claims — the interview seniority pattern and 'slow systems are usually waiting' — are unquantified generalisations from a single case.
No adoption signal in supplied sources
The cluster contains no release, deployment disclosure, benchmark, usage figure, pricing or licence change, or security advisory. The only change described is an internal fix to an unnamed service with no dates, scale, or downstream uptake, which cannot be scored as adoption without inventing facts.
Modest overstatement concentrated in framing, not in the technical claims
The technical body is restrained and even anti-hype: the fix is described as 'not particularly impressive' and no product, vendor, or tool is promoted. Overstatement is limited and mostly framing — the headline says the bug 'took production down' while the narrative insists requests slowed rather than failed and recovered on their own, and the lesson claim that an acquisition-time metric 'would have exposed the problem almost immediately' is an untestable counterfactual. The 'very often, it isn't doing anything, it's waiting' generalisation also outruns the single case supplied.
Reputational and mentoring incentives, no disclosed commercial stake
The author is an individual publishing on a developer platform and closes with interview coaching and mentoring advice, so there is a clear personal-credibility incentive to present the war story as a demonstration of superior reasoning — including the flattering contrast between the author's question and colleagues' guesses. Against that, no product, employer, tool, or vendor is named or promoted anywhere in the piece, and the recommended practices are generic instrumentation habits rather than purchasable offerings, so commercial distortion pressure is low.
Mechanism credible, specifics unverifiable
Confidence is moderate-low. The described failure mode — connection pool exhaustion producing large waits with idle CPU and fast underlying queries — is a common, well-understood pattern, and the reported figures hang together arithmetically, so the narrative is likely broadly accurate. But it is single-sourced, undated, anonymous as to stack and organisation, unaccompanied by artefacts or post-fix verification, and adoption cannot be scored at all, so any specific number or the generalised interview and 'systems are waiting' claims should be treated as illustrative rather than established.
build
Three services you can delete: queue, cache and search in one Postgres1 distinct publisher
build
The /userinfo fallback that quietly made Auth0 a hard dependency on every request1 distinct publisher
build
Four control planes, one Postgres: a team's case against polyglot persistence1 distinct publisher
build
The reason your agent gets worse after an hour is that nothing ever leaves the context window1 distinct publisher
Distinct publishers with included, body-backed reporting in this cluster.
dev.to
1 article · August 23, 2026