diff --git a/docs/env.md b/docs/env.md index df57ad0b..04ee1132 100644 --- a/docs/env.md +++ b/docs/env.md @@ -48,6 +48,7 @@ These are the environment variables you can set for the `impress-backend` contai | DB_PORT | Port of the database | 5432 | | DB_PSYCOPG_POOL_MIN_SIZE | The psycopg min pool size | 4 | | DB_PSYCOPG_POOL_MAX_SIZE | The psycopg max pool size | None | +| DB_PSYCOPG_POOL_TIMEOUT | The default maximum time in seconds that a client can wait to receive a connection from the pool | 3 | | DB_USER | User to authenticate with | dinum | | DJANGO_ALLOWED_HOSTS | Allowed hosts | [] | | DJANGO_CELERY_BROKER_TRANSPORT_OPTIONS | Celery broker transport options | {} | diff --git a/src/backend/impress/settings.py b/src/backend/impress/settings.py index 64a043fe..fea12040 100755 --- a/src/backend/impress/settings.py +++ b/src/backend/impress/settings.py @@ -110,6 +110,11 @@ class Base(Configuration): environ_name="DB_PSYCOPG_POOL_MAX_SIZE", environ_prefix=None, ), + "timeout": values.IntegerValue( + 3, + environ_name="DB_PSYCOPG_POOL_TIMEOUT", + environ_prefix=None, + ), } }, }