diff --git a/charts/controller/values.yaml b/charts/controller/values.yaml index 595be7e1a..3701bac2a 100644 --- a/charts/controller/values.yaml +++ b/charts/controller/values.yaml @@ -60,7 +60,7 @@ global: # # Valid values are a number of seconds, or 0 to disable persistent connections. # Setting the value to "None" will ensure that connections are never timed out. - # - 0 + # - 0 # - 600 # - "None" # conn_max_age: 600 diff --git a/rootfs/api/settings/production.py b/rootfs/api/settings/production.py index fd745752e..1a3a0a006 100644 --- a/rootfs/api/settings/production.py +++ b/rootfs/api/settings/production.py @@ -368,7 +368,7 @@ 'HOST': os.environ.get('DEIS_DATABASE_SERVICE_HOST', ''), 'PORT': os.environ.get('DEIS_DATABASE_SERVICE_PORT', 5432), # https://docs.djangoproject.com/en/1.11/ref/databases/#persistent-connections - 'CONN_MAX_AGE': 600, + 'CONN_MAX_AGE': int(os.environ.get('CONN_MAX_AGE', 600)), } }