Keep persistent connections to the database instead of recreating a new one for each request

This commit is contained in:
Eliot Berriot 2019-04-19 14:29:43 +02:00
parent 5efe427b76
commit b42dfb71d1
No known key found for this signature in database
GPG Key ID: DD6965E2476E5C27
2 changed files with 2 additions and 0 deletions

View File

@ -220,6 +220,7 @@ DATABASES = {
"default": env.db("DATABASE_URL")
}
DATABASES["default"]["ATOMIC_REQUESTS"] = True
DATABASES["default"]["CONN_MAX_AGE"] = env("DB_CONN_MAX_AGE", default=60 * 60)
MIGRATION_MODULES = {
# see https://github.com/jazzband/django-oauth-toolkit/issues/634

View File

@ -0,0 +1 @@
Keep persistent connections to the database instead of recreating a new one for each request