Set CONN_MAX_AGE to 60 seconds -- fixes #710

Setting the value in the production config.
This commit is contained in:
Bruno Alla 2017-11-01 19:34:59 +00:00
parent b2fbb36b9d
commit 89c9704f9a

View File

@ -182,12 +182,14 @@ DATABASES = {
'PASSWORD': env('RDS_PASSWORD'),
'HOST': env('RDS_HOSTNAME'),
'PORT': env('RDS_PORT'),
'CONN_MAX_AGE': 60,
}
}
{% else %}
# Use the Heroku-style specification
# Raises ImproperlyConfigured exception if DATABASE_URL not in os.environ
DATABASES['default'] = env.db('DATABASE_URL')
DATABASES['default']['CONN_MAX_AGE'] = 60
{%- endif %}
# CACHING