Commit 87652a9
committed
Fix "server closed connection unexpectedly" db issue
The engine outlives individual requests, so pooled connections can be
dropped server-side (idle timeouts, firewall reaps, failovers) while
still sitting in the pool. pool_pre_ping validates a connection before
use and transparently reconnects if it is dead; pool_recycle bounds
connection age so they are refreshed before common idle-timeout windows.
Without these, a stale connection surfaces as "server closed the
connection unexpectedly".
Assisted-by: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Lukas Puehringer <lukas.puehringer@eclipse-foundation.org>1 parent c5b263b commit 87652a9
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
| |||
0 commit comments