Skip to content

v0.5.1-animo.1

Latest

Choose a tag to compare

@TimoGlastra TimoGlastra released this 30 Jul 12:09

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 (default 1, seconds) — deadline for the liveness ping; 0 disables the ping entirely
  • min_idle_for_ping (default 1, 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 xz

Note: Linux builds are manylinux2014 (glibc ≥ 2.17) — they do not run on musl-based images (Alpine).