You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Django ORM leaves open database connections in IDLE state for following REST API endpoints:
- GET /api/users/me
- GET /api/nodes/<id>
- GET /api/thumbnails/<id>
- GET /api/documents/<id>
- GET /api/pages/<id>/jpg
- GET /api/pages/<id>/svg
As result connections pile-up and when reaching specific limit, e.g. 100, 50, 25, depending on DB config, the app stops working as DB refuses all further connections. Same behavior was observed for PostgreSQL 16.1 and MariaDB 11.2.
Expected behavior: DB connections should be released when not used; or number of DB connections should remain stable when connection pooling is employed.
Info:
Browser: any
PostgreSQL 16.1
Papermerge 3.0
The text was updated successfully, but these errors were encountered:
The solution is to replace Django ORM with SQLAlchemy. Of course ORM replacement it not matter of couple of weeks.
This ticket is for fixing the most critical parts so that app is usable in production.
Django ORM leaves open database connections in IDLE state for following REST API endpoints:
As result connections pile-up and when reaching specific limit, e.g. 100, 50, 25, depending on DB config, the app stops working as DB refuses all further connections. Same behavior was observed for PostgreSQL 16.1 and MariaDB 11.2.
Expected behavior: DB connections should be released when not used; or number of DB connections should remain stable when connection pooling is employed.
Info:
The text was updated successfully, but these errors were encountered: