Explicitly set the connection age to 0 in the django settings. Seems to be some strange behavior with async gunicorn + django db

This commit is contained in:
sabaimran 2024-06-04 20:31:51 +05:30
parent 85a343363b
commit acfdc8da77

View file

@ -121,7 +121,7 @@ DATABASES = {
"USER": os.getenv("POSTGRES_USER", "postgres"), "USER": os.getenv("POSTGRES_USER", "postgres"),
"NAME": os.getenv("POSTGRES_DB", "khoj"), "NAME": os.getenv("POSTGRES_DB", "khoj"),
"PASSWORD": os.getenv("POSTGRES_PASSWORD", "postgres"), "PASSWORD": os.getenv("POSTGRES_PASSWORD", "postgres"),
"CONN_MAX_AGE": 200, "CONN_MAX_AGE": 0,
} }
} }