File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 6363# DATABASES
6464# ------------------------------------------------------------------------------
6565# https://docs.djangoproject.com/en/dev/ref/settings/#databases
66- DB_STATEMENT_TIMEOUT = env .int ("DB_STATEMENT_TIMEOUT" , 60_000 )
66+ # DB statements should timeout before Gunicorn, so this value must be less than WEB_WORKER_TIMEOUT on gunicorn.py
67+ DB_STATEMENT_TIMEOUT = env .int ("DB_STATEMENT_TIMEOUT" , 50_000 )
68+
6769DATABASES = {
6870 "default" : env .db ("DATABASE_URL" ),
6971}
7779 "min_size" : env .int ("DB_MIN_CONNS" , default = 4 ),
7880 "max_size" : env .int ("DB_MAX_CONNS" , default = 100 ),
7981 "timeout" : env .int ("DB_POOL_TIMEOUT" , default = 10 ),
80- "max_lifetime" : env .int ("DB_POOL_MAX_LIFETIME" , default = 60 * 60 ), # 1 hour
81- "max_idle" : env .int ("DB_POOL_MAX_IDLE" , default = 60 * 10 ), # 10 minutes
82+ "max_lifetime" : env .int ("DB_POOL_MAX_LIFETIME" , default = 60 * 5 ), # 5 minutes
83+ "max_idle" : env .int ("DB_POOL_MAX_IDLE" , default = 60 * 2 ), # 2 minutes
8284 },
8385}
8486
You can’t perform that action at this time.
0 commit comments