From 980eb5f424198ce6521a7f6c78b552abb47d09fc Mon Sep 17 00:00:00 2001 From: Alexander Saprykin Date: Mon, 30 Jul 2018 17:00:29 +0200 Subject: [PATCH] Disable Django persistent connections (cherry picked from commit 37b3258fba11ab802411932da0ab4d870975c219) --- galaxy/settings/production.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/galaxy/settings/production.py b/galaxy/settings/production.py index 2f4c3d3e0..d26a8a969 100644 --- a/galaxy/settings/production.py +++ b/galaxy/settings/production.py @@ -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=60) + env='GALAXY_DB_URL', conn_max_age=0) else: DATABASES['default'] = { 'ENGINE': 'django.db.backends.postgresql_psycopg2', @@ -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': 60, + 'CONN_MAX_AGE': 0, } # Create default alias for worker logging