Commit 1272051d authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Merge branch 'connections-issues' into 'master'

Mitigate DB Connections issues

See merge request !937
parents cfda280d 28b334ad
#!/bin/bash -eux
python /app/ collectstatic --noinput
gunicorn config.asgi:application -w ${FUNKWHALE_WEB_WORKERS-1} -k uvicorn.workers.UvicornWorker -b
gunicorn config.asgi:application -w ${FUNKWHALE_WEB_WORKERS-1} -k uvicorn.workers.UvicornWorker -b ${GUNICORN_ARGS-}
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.production")
os.environ.setdefault("ASGI_THREADS", "5")
import django # noqa
......@@ -270,7 +270,7 @@ DATABASES = {
"default": env.db("DATABASE_URL")
DATABASES["default"]["CONN_MAX_AGE"] = env("DB_CONN_MAX_AGE", default=60 * 60)
DATABASES["default"]["CONN_MAX_AGE"] = env("DB_CONN_MAX_AGE", default=60 * 5)
# see
Reduce the number of simultaneous DB connections under some deployment scenario
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment