---
id: "axiom_psycopg2_keepalive_001"
category: "infrastructure"
date: "2026-02-21"
source_file: "failure_010 pre-mortem 2026-02-21"
---

# axiom_psycopg2_keepalive_001

ALL psycopg2 connection pools to remote PostgreSQL (Elestio) MUST include keepalives=1, keepalives_idle=30, keepalives_interval=10, keepalives_count=5. Without this, idle connections are silently closed by PG server after ~30min, causing health check failures and service restart loops.
