[Django]-Django CONN_MAX_AGE setting error

17👍

Unlike the PORT, provide the CONN_MAX_AGE setting as an integer (not as a string):

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2', 
        'NAME': 'myDB',
        'USER': 'myuser',
        'PASSWORD': 'mypass',
        'HOST': '',
        'CONN_MAX_AGE': 60,  # seconds for persistent connection, since Django 1.6
        'PORT': '5432',
    }
}
👤SaeX

Leave a comment