Skip to content

Fix "server closed connection unexpectedly" db issue#65

Merged
lukpueh merged 1 commit into
mainfrom
fix-db-connection
Jul 9, 2026
Merged

Fix "server closed connection unexpectedly" db issue#65
lukpueh merged 1 commit into
mainfrom
fix-db-connection

Conversation

@lukpueh

@lukpueh lukpueh commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

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

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>
@lukpueh
lukpueh merged commit 2f45d8d into main Jul 9, 2026
7 checks passed
@lukpueh
lukpueh deleted the fix-db-connection branch July 9, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants