From d1cd01f555fe3179fae458356b958b878a94d725 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 <80892890+shaohuzhang1@users.noreply.github.com> Date: Wed, 23 Jul 2025 17:15:38 +0800 Subject: [PATCH] refactor: recycle db connection to avoid "the connection is closed" exception. (#3726) --- apps/smartdoc/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/smartdoc/conf.py b/apps/smartdoc/conf.py index 21deebf55..bbe3105e2 100644 --- a/apps/smartdoc/conf.py +++ b/apps/smartdoc/conf.py @@ -116,7 +116,8 @@ class Config(dict): "POOL_OPTIONS": { "POOL_SIZE": 20, "MAX_OVERFLOW": int(self.get('DB_MAX_OVERFLOW')), - 'RECYCLE': 30 * 60 + "RECYCLE": 1800, + "TIMEOUT": 30 } }