maziggy
4ad43c96de
fix(db): configurable connection pool + auth_enabled cache for large farms ( #2572 )
...
Large PostgreSQL farms exhausted the fixed pool (pool_size=10 +
max_overflow=20): with ~93 printers every connection sat idle in
transaction and unrelated requests waited out the 30s pool timeout or
failed in the auth middleware.
- Make pool sizing env-configurable (DB_POOL_SIZE / DB_MAX_OVERFLOW /
DB_POOL_TIMEOUT / DB_POOL_RECYCLE); raise the Postgres default to
20 + 80 with pool_pre_ping + pool_recycle=1800.
- Cache the auth_enabled probe (30s) to drop a per-request DB round-trip.
Only enabled=True is cached, so staleness fails closed; set_auth_enabled
invalidates immediately.
- Add GET /api/v1/system/db-pool exposing resolved config + live
checked_out/checked_in/overflow gauges without consuming a connection.
Session-hygiene (connections held across MQTT/FTP/camera/3MF I/O) is a
separate follow-up.
2026-07-16 08:16:48 +02:00
..
2026-06-06 10:41:28 +02:00
2026-07-14 11:52:56 +02:00
2026-07-01 09:50:30 +02:00
2026-06-04 11:30:26 +02:00
2026-07-16 07:50:51 +02:00
2026-06-03 10:14:57 +02:00
2026-05-30 13:49:09 +02:00
2026-06-20 12:07:20 +02:00
2026-05-22 10:02:41 +02:00
2026-06-06 13:40:56 +02:00
2026-06-25 09:00:57 +02:00
2026-07-14 11:29:56 +02:00
2026-05-24 12:51:24 +02:00
2026-05-15 15:43:37 +02:00
2026-07-16 08:16:48 +02:00
2026-05-24 10:16:30 +02:00
2026-06-05 13:53:26 +02:00
2026-05-29 10:55:41 +02:00
2026-05-24 08:49:21 +02:00
2026-06-09 07:38:59 +02:00
2026-05-28 08:40:43 +02:00
2026-06-05 13:53:26 +02:00
2026-07-09 08:17:59 +02:00
2026-06-06 13:30:13 +02:00
2026-07-13 09:18:17 +02:00
2026-06-19 11:29:07 +02:00
2026-06-20 12:07:20 +02:00
2026-07-11 14:44:45 +02:00
2026-05-16 14:35:47 +02:00
2026-06-02 14:51:08 +02:00
2026-06-02 14:51:08 +02:00
2026-05-22 10:22:14 +02:00
2026-07-12 08:44:53 +02:00
2026-06-22 14:23:30 +02:00
2026-06-17 11:33:23 +02:00
2026-06-17 11:33:23 +02:00
2026-07-14 11:29:56 +02:00
2026-07-14 11:29:56 +02:00
2026-07-14 10:35:58 +02:00
2026-06-02 10:02:17 +02:00
2026-06-02 10:02:17 +02:00
2026-06-02 12:42:16 +02:00
2026-06-20 08:28:44 +02:00
2026-05-21 08:45:59 +02:00
2026-05-15 08:50:37 +02:00
2026-05-15 08:50:37 +02:00
2026-05-15 08:50:37 +02:00
2026-05-15 08:50:37 +02:00
2026-06-25 14:54:27 +02:00
2026-07-11 14:22:31 +02:00
2026-05-17 09:30:02 +02:00
2026-05-20 08:12:17 +02:00
2026-06-09 09:16:36 +02:00
2026-06-20 12:07:20 +02:00
2026-07-09 08:43:59 +02:00
2026-06-20 12:07:20 +02:00
2026-05-21 08:30:17 +02:00
2026-06-20 12:55:24 +02:00
2026-06-08 08:18:13 +02:00
2026-06-11 09:23:03 +02:00
2026-06-25 11:07:29 +02:00
2026-06-22 14:13:44 +02:00
2026-05-19 10:53:36 +02:00
2026-05-25 09:04:47 +02:00
2026-06-02 12:12:54 +02:00
2026-07-07 12:17:46 +02:00
2026-07-05 09:32:02 +02:00
2026-07-07 12:17:46 +02:00
2026-06-29 12:59:09 +02:00
2026-06-26 12:31:48 +02:00
2026-07-07 10:07:47 +02:00
2026-07-15 07:13:22 +02:00
2026-06-09 10:43:07 +02:00
2026-05-20 11:25:45 +02:00
2026-05-24 09:18:38 +02:00
2026-07-08 08:57:56 +02:00
2026-06-29 12:35:43 +02:00
2026-07-14 10:35:58 +02:00
2026-06-17 12:04:57 +02:00
2026-07-02 11:32:22 +02:00
2026-05-14 15:28:41 +02:00
2026-06-12 10:14:06 +02:00
2026-06-12 10:14:06 +02:00
2026-06-28 13:52:05 +02:00
2026-05-18 08:51:27 +02:00
2026-06-17 11:33:23 +02:00
2026-06-25 10:46:57 +02:00
2026-05-20 11:00:54 +02:00
2026-07-15 07:29:16 +02:00
2026-05-22 09:05:25 +02:00
2026-07-14 10:35:58 +02:00
2026-06-14 10:58:02 +02:00
2026-07-12 08:44:53 +02:00
2026-06-18 11:46:07 +02:00
2026-07-02 11:32:22 +02:00
2026-05-24 12:30:12 +02:00
2026-06-27 11:28:00 +02:00
2026-05-15 08:50:37 +02:00
2026-07-15 07:29:16 +02:00
2026-06-22 11:15:39 +02:00
2026-06-05 17:19:16 +02:00
2026-05-30 13:34:10 +02:00
2026-05-30 13:34:10 +02:00
2026-07-05 10:32:13 +02:00
2026-06-02 14:33:20 +02:00
2026-07-11 10:06:03 +02:00
2026-07-02 10:13:01 +02:00
2026-06-03 10:04:37 +02:00
2026-06-11 13:35:20 +02:00
2026-06-27 11:28:00 +02:00