AlmaLinux / AlmaLinux/build-system

Fix database connections leakage in core (web server)

未關閉
#255 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
沒有語言資料
星號
32
分支
11
PR 合併指標
30 天內沒有已合併 PR

描述

Right now we connect to the database without any connection pooling. This means that for each new request we will create a new connection to the database. It leads to several caveats:

- Database connection is costly, so creating new one takes some time;
- We close most of them, but sometimes the connection is left hanging in idle or in idle in transaction state, so without some tweaking on database side we may exhaust our connections to the database;

We need to use a proper pooling (either sqlalchemy one or setup pgbouncer).

AC:

- No leaking connections to the database;
- Pooling is used instead of creating new connection each time;

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。