Change all uses of CONN_MAX_AGE to 0

Database connection when using gunicorn microthreads
are not shared by the microthreads and can exhaust the
number of open connections available.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2019-05-17 16:43:23 -04:00
parent edd6f4eb76
commit 0a21748b0c
6 changed files with 11 additions and 7 deletions
+1 -1
View File
@@ -330,7 +330,7 @@ CELERY_RESULT_BACKEND = os.environ.get('MAYAN_CELERY_RESULT_BACKEND')
environment_database_engine = os.environ.get('MAYAN_DATABASE_ENGINE')
if environment_database_engine:
environment_database_conn_max_age = os.environ.get('MAYAN_DATABASE_CONN_MAX_AGE', None)
environment_database_conn_max_age = os.environ.get('MAYAN_DATABASE_CONN_MAX_AGE', 0)
if environment_database_conn_max_age:
environment_database_conn_max_age = int(environment_database_conn_max_age)