From 92f7bcfd9e3d89a965edb427d6c67c98c7255d79 Mon Sep 17 00:00:00 2001 From: Herculino Trotta Date: Sat, 6 Dec 2025 16:46:33 -0300 Subject: [PATCH] fix: try to fix "the connection is closed" db errors --- app/WYGIWYH/settings.py | 3 +++ requirements.txt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/WYGIWYH/settings.py b/app/WYGIWYH/settings.py index 4fab03a..b1912b3 100644 --- a/app/WYGIWYH/settings.py +++ b/app/WYGIWYH/settings.py @@ -151,6 +151,9 @@ DATABASES = { "PASSWORD": os.getenv("SQL_PASSWORD", "password"), "HOST": os.getenv("SQL_HOST", "localhost"), "PORT": os.getenv("SQL_PORT", "5432"), + "OPTIONS": { + "pool": True, + }, } } diff --git a/requirements.txt b/requirements.txt index afa8260..19b1b16 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ Django~=5.2.9 -psycopg[binary]==3.2.9 +psycopg[binary,pool]==3.2.9 django-vite==3.1.0 django-crispy-forms==2.5 crispy-bootstrap5==2025.6