Repository navigation
Door pools keep an idle connection 120 s, not 240 s - #635
Conversation
RDS reported the micro critically low on memory after #622 and lowered shared_buffers for the next restart (#630). Replayed a week of requests through the pool: 120 s keeps 82% of 240 s's saved connections (89% on a quiet half-day) for about half the idle backends. web-api's connect_ms p50 stays at 0. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Read back live (02:12 to 04:07 CDT): app backends averaged 2.20 (Enhanced Monitoring) against 3.57 at 240 s and 1.36 at 30 s the same hours yesterday. DatabaseConnections averaged 2.3 against 3.5. web-api |
Follow-up to #622, for #630.
#622 raised the door pools' idle timeout from 30 s to 240 s. At 01:33 CDT the same morning RDS reported the
db.t4g.micro"critically low on memory" and loweredshared_buffersfrom 23,081 to 11,295 pages for the next restart (#630).DatabaseConnectionswent from 1 to 3 to about 5.This weighs what 240 s bought against what it held, and settles on 120 s.
Method. A week of real requests, replayed per environment through pg-pool's own rules (LIFO reuse, the idle timer,
min, the 300 s lifetime and each door'smax). The requests were 2,833 web-api reads that took a lease, 2,539 MCP tool calls and the collector's leases. The replay matches what was observed:Benefit and cost:
connect_msp50 falls from 33 ms to 0. MCP barely moves. The collector was already warm.min: 1with a short idle holds nearly as much as 240 s, because the kept connection lives its full 300 s.maxstays. Bursts are what need it.[engineering] default changed: DECISIONS' door-pool line now says 120 s, with the evidence in
docs/notes/2026-10-21-pool-idle-120.md. No contract moves.npm run verifygreen.e2e-needed.shprints false.🤖 Generated with Claude Code