Skip to content

Revert "lava_server: Enable persistent database connections by default"

This reverts commit 2b32a8a9.

The reason is because it only works with a specific WSGI servers. Reverting this commit changes CONN_MAX_AGE to its default: 0.

By default LAVA runs with Gunicorn async workers (Eventlet). This results in Django ORM opening a separate database connection for each request (and not reusing open connections). Keeping them open can lead to "too many clients" error in PostgreSQL.

Setting CONN_MAX_AGE to 0 makes the worker close connection after every request.

This change has been researched by: Igor Ponomarev igor.ponomarev@collabora.com

Signed-off-by: Paweł Wieczorek pawiecz@collabora.com

Merge request reports