Skip to content

Commit

Permalink
Merge pull request ansible#982 from cutwater/fix/db-connections
Browse files Browse the repository at this point in the history
Limit persistent connection lifetime
  • Loading branch information
cutwater authored Jul 30, 2018
2 parents 7163271 + 459f13c commit 9217fd5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions galaxy/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def _read_secret_key(settings_dir='/etc/galaxy'):

if os.environ.get('GALAXY_DB_URL'):
DATABASES['default'] = dj_database_url.config(
env='GALAXY_DB_URL', conn_max_age=None)
env='GALAXY_DB_URL', conn_max_age=60)
else:
DATABASES['default'] = {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
Expand All @@ -94,7 +94,7 @@ def _read_secret_key(settings_dir='/etc/galaxy'):
'PASSWORD': os.environ.get('GALAXY_DB_PASSWORD', ''),
'HOST': os.environ.get('GALAXY_DB_HOST', ''),
'PORT': int(os.environ.get('GALAXY_DB_PORT', 5432)),
'CONN_MAX_AGE': None,
'CONN_MAX_AGE': 60,
}

# Create default alias for worker logging
Expand Down

0 comments on commit 9217fd5

Please sign in to comment.