Skip to content

Commit

Permalink
fix(local-dev): postgres connection max age to 0? (#14006)
Browse files Browse the repository at this point in the history
* fix(local-dev): postgres connection max age to 0?

* remove conn_max_age

* 600 in prod/test, only 0 in debug

* Update posthog/settings/data_stores.py

---------

Co-authored-by: Neil Kakkar <[email protected]>
  • Loading branch information
mariusandra and neilkakkar authored Feb 13, 2023
1 parent 6764620 commit 3268adc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion posthog/settings/data_stores.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
DATABASE_URL = os.getenv("DATABASE_URL", "")

if DATABASE_URL:
DATABASES = {"default": dj_database_url.config(default=DATABASE_URL, conn_max_age=600)}
DATABASES = {"default": dj_database_url.config(default=DATABASE_URL, conn_max_age=0)}
if DISABLE_SERVER_SIDE_CURSORS:
DATABASES["default"]["DISABLE_SERVER_SIDE_CURSORS"] = True
elif os.getenv("POSTHOG_DB_NAME"):
Expand Down

0 comments on commit 3268adc

Please sign in to comment.