Skip to content

🛡️ Warracker is an open source, self-hostable warranty tracker to monitor expirations, store receipts, files. You own the data, your rules!

Changelog: record the DB pool hardening from PR #297

Omega (QA)4f501fd69cfc
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5538961..f633ea0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,6 +16,8 @@
- _Files: `frontend/style.css`_
- **Edit button greyed out for warranties you cannot edit:** now that the status page detail panel opens for another user's warranty under global view, its Edit button no longer promises an edit that fails on save. For a viewer who is neither the owner nor an admin, the button renders greyed out and disabled and does nothing on click. Owners and admins keep a working Edit button. The same disabled state applies to the Edit Warranty button in the notes modal, which opens from warranty cards. The main page cards already showed no Edit button for other users' warranties, so they are unchanged, and the server side restriction on editing is unchanged. The statistics payloads now carry the owner id for each warranty so the status page can make that decision from its cached list.
- _Files: `frontend/status.js`, `frontend/js/components/notes.js`, `frontend/style.css`, `backend/statistics_routes.py`_
+- **Database connections released earlier and the pool hardened (#297, by joaoalves03):** authentication held a database connection, with its transaction open, for the whole request, so every authenticated request used two connections and the idle one could pin a pooler connection until the response was sent, stalling requests behind PgBouncer under load. The connection is now released before the route runs. The pool also moved to a locking pool, waits for a free connection instead of failing at once, returns each connection exactly once to the pool it came from, discards broken connections, and rebuilds itself if it was closed. New settings: `DB_POOL_MAX`, `DB_POOL_MIN`, and `DB_POOL_WAIT_SECONDS`. The defaults match the previous pool size, so existing installs see no change unless they set them.
+ - _Files: `backend/auth_utils.py`, `backend/db_handler.py`_
## 1.0.6 - 2026-11-10