Skip to content

Commit 5ba725b

Browse files
authored
refactor: recycle db connection to avoid "the connection is closed" exception. (#3726) (#3727)
1 parent d1cd01f commit 5ba725b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

apps/smartdoc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def get_db_setting(self) -> dict:
113113
"USER": self.get('DB_USER'),
114114
"PASSWORD": self.get('DB_PASSWORD'),
115115
"ENGINE": self.get('DB_ENGINE'),
116+
"CONN_MAX_AGE": 0,
116117
"POOL_OPTIONS": {
117118
"POOL_SIZE": 20,
118119
"MAX_OVERFLOW": int(self.get('DB_MAX_OVERFLOW')),

0 commit comments

Comments
 (0)