perf: bound database concurrency for preregistered H6 trial

This commit is contained in:
2026-10-16 01:11:42 +03:00
parent 08e345fd14
commit ca8223dba9
7 changed files with 75 additions and 16 deletions
+4 -3
View File
@@ -105,9 +105,10 @@ class Database:
name: str = "messenger"
user: str = "messenger"
password: str = field(default="", repr=False)
# соединений в пуле и сверх него: пул считается на один процесс
pool_size: int = 10
pool_overflow: int = 5
# ограничиваем конкурентную работу с БД; избыток запросов ждёт пул
# лимит считается на один процесс, переполнение отключено
pool_size: int = 2
pool_overflow: int = 0
# секунды ожидания свободного соединения пула
pool_timeout: float = 5.0
# секунды на установку соединения