perf: keep a fixed PostgreSQL pool without overflow connections

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-11 13:25:26 +03:00
co-authored by Claude Opus 5.5
parent 0b0421ad2f
commit 9c3959d768
7 changed files with 117 additions and 6 deletions
+2 -1
View File
@@ -23,7 +23,8 @@ keep_alive_seconds = 60
# Адрес, порт, пользователь, пароль и имя базы приходят из .env (мосты к
# POSTGRES_*) и из environment compose; здесь их не указывать.
pool_size = 10
max_overflow = 5
# 0 — без переполнения: соединения сверх pool_size переоткрывались бы
max_overflow = 0
# секунды ожидания свободного соединения пула
pool_timeout_seconds = 5
# секунды на установку соединения