Skip to content

Commit

Permalink
Improve db connection handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ipmb committed Sep 26, 2024
1 parent d28d4f5 commit a26095f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion project_name/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@
# Database
# https://docs.djangoproject.com/en/{{ docs_version }}/ref/settings/#databases

DATABASES = {"default": dj_database_url.parse(config.DATABASE_URL)}
DATABASES = {
"default": dj_database_url.parse(
config.DATABASE_URL,
conn_max_age=600,
conn_health_checks=True,
)
}


# Password validation
Expand Down

0 comments on commit a26095f

Please sign in to comment.