From 47f5848414e5391542590cbbd10cbbe0ca2c9fc9 Mon Sep 17 00:00:00 2001 From: Krystle Salazar Date: Thu, 28 Nov 2024 12:57:37 -0400 Subject: [PATCH] Use postgres connection pool with default options --- api/conf/settings/databases.py | 4 +--- api/pdm.lock | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/api/conf/settings/databases.py b/api/conf/settings/databases.py index 5473bcc66b1..f0726b5cc3d 100644 --- a/api/conf/settings/databases.py +++ b/api/conf/settings/databases.py @@ -12,9 +12,6 @@ "USER": config("DJANGO_DATABASE_USER", default="deploy"), "PASSWORD": config("DJANGO_DATABASE_PASSWORD", default="deploy"), "NAME": config("DJANGO_DATABASE_NAME", default="openledger"), - # Default of 30 matches RDS documentation's advised max DNS caching time - # https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_BestPractices.html#CHAP_BestPractices.DiskPerformance - "CONN_MAX_AGE": config("DJANGO_CONN_MAX_AGE", default=30), "CONN_HEALTH_CHECKS": config( "DJANGO_CONN_HEALTH_CHECKS", default=True, cast=bool ), @@ -22,6 +19,7 @@ "application_name": config( "DJANGO_DATABASE_APPLICATION_NAME", default="openverse-api" ), + "pool": True, }, } } diff --git a/api/pdm.lock b/api/pdm.lock index ca3b340ce54..1b3981452a5 100644 --- a/api/pdm.lock +++ b/api/pdm.lock @@ -5,7 +5,7 @@ groups = ["default", "dev", "overrides", "test"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:196d9006e8125695a3b72ca2151fbc0856f3b1412bceef6fe1ac42a58f3be454" +content_hash = "sha256:bfeb04ce41b28c0b73b3d7ee1881098bf14284ab2a89570adef9b0671d6d23f3" [[metadata.targets]] requires_python = "==3.12.*"