Skip to content

Commit d1cd01f

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/smartdoc/conf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ def get_db_setting(self) -> dict:
116116
"POOL_OPTIONS": {
117117
"POOL_SIZE": 20,
118118
"MAX_OVERFLOW": int(self.get('DB_MAX_OVERFLOW')),
119-
'RECYCLE': 30 * 60
119+
"RECYCLE": 1800,
120+
"TIMEOUT": 30
120121
}
121122
}
122123

0 commit comments

Comments
 (0)