A utility script to test persistent postgres connections.
The script is designed to run with an exponential backoff a SELECT 1
to check if the connection is still valid.
How to use this:
cp .env.example .env
# fill the CONNECTION STRING
uv run main.py
We have some random connection error between database and client, especially on long-running processes (queues). Since there is no easy and visible pattern we want to try and reproduce this connection errors.