You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(lik-ui): keep the scheduled-runs DB connection alive across a long run
The scheduled-runs cron has failed for three days with `PoolTimeout: couldn't
get a connection after 5.00 sec` — always at the terminal `complete_run`, and
always on a run long enough (33–40 min) to leave the pooled connection idle for
that whole stretch. The agent runs themselves completed; only recording the
outcome failed, which aborted the scan and left the row to be reclaimed as
`abandoned` (and the completed work repeated) on the next tick.
The path to the public Postgres endpoint silently drops a long-idle connection
without a FIN, so the checkout-time check can block on TCP retransmission far
past the 5s budget and then report a timeout with no attempt left to reconnect.
- Enable TCP keepalives (plus `connect_timeout`) on the conninfo: the connection
now survives the idle stretch, and a dead one is reported in seconds instead
of blocking.
- Make the pool's checkout timeout configurable; the scanner uses 30s so a
stale connection can be replaced, while a web request still fails fast.
- Retry a run's terminal write, and if it still cannot be recorded, finish the
remaining rows and exit non-zero instead of raising out of the scan.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments