From 5ba725ba18ef5a596ee70754252faae159d36945 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Wed, 23 Jul 2025 17:40:39 +0800 Subject: [PATCH] refactor: recycle db connection to avoid "the connection is closed" exception. (#3726) (#3727) --- apps/smartdoc/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/smartdoc/conf.py b/apps/smartdoc/conf.py index bbe3105e2..36a06e8d2 100644 --- a/apps/smartdoc/conf.py +++ b/apps/smartdoc/conf.py @@ -113,6 +113,7 @@ class Config(dict): "USER": self.get('DB_USER'), "PASSWORD": self.get('DB_PASSWORD'), "ENGINE": self.get('DB_ENGINE'), + "CONN_MAX_AGE": 0, "POOL_OPTIONS": { "POOL_SIZE": 20, "MAX_OVERFLOW": int(self.get('DB_MAX_OVERFLOW')),