diff --git a/.env.sample b/.env.sample index 6daa4bf..021b6f6 100644 --- a/.env.sample +++ b/.env.sample @@ -27,6 +27,7 @@ DB_PASSWORD = '' DB_HOST = 'postgres' DB_PORT = '5432' DB_SSL_MODE = 'disable' +DB_DISABLE_SERVER_SIDE_CURSORS = 'False' # If you're using an external connection bouncer (eg. PgBouncer), set this to True # Redis # Used for DB cache and Celery broker diff --git a/backend/config/settings.py b/backend/config/settings.py index c486651..bfd5707 100644 --- a/backend/config/settings.py +++ b/backend/config/settings.py @@ -227,7 +227,7 @@ DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql", # Set to True to avoid issues with pgbouncer when pooling connections - 'DISABLE_SERVER_SIDE_CURSORS': True, + 'DISABLE_SERVER_SIDE_CURSORS': get_secret("DB_DISABLE_SERVER_SIDE_CURSORS"), "NAME": get_secret("DB_DATABASE"), "USER": get_secret("DB_USERNAME"), "PASSWORD": get_secret("DB_PASSWORD"),