Custom Animo build of askar v0.5.0 plus the fix from openwallet-foundation/askar#479 (commit c2bb0d3): recover from half-open postgres connections with a bounded liveness ping.
What's fixed
The postgres pool handed out pooled connections untested (test_before_acquire(false)). A connection that died while idle — killed cleanly by a restart, or silently dropped by NAT/Cloud Run-style infrastructure — caused the next session open to either error immediately or hang for ~15 minutes with no timeout at any layer.
This build pings connections that have been idle for more than a second in before_acquire, under a dedicated short deadline. Dead connections (including half-open ones, whose ping hangs rather than errors) are discarded and redialed transparently within the same acquire — callers see no error as long as the database is reachable.
New URI parameters
ping_timeout(default1, seconds) — deadline for the liveness ping;0disables the ping entirelymin_idle_for_ping(default1, seconds) — connections used more recently than this skip the ping
Usage
Fetch the library for your platform and replace the bundled libaries_askar in the askar wrapper package, e.g.:
curl -fsSL https://github.com/animo/askar/releases/download/v0.5.1-animo.1/library-linux-x86_64.tar.gz | tar xzNote: Linux builds are manylinux2014 (glibc ≥ 2.17) — they do not run on musl-based images (Alpine).