mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
refactor: recycle db connection to avoid "the connection is closed" exception.
This commit is contained in:
parent
3d08263f79
commit
063920ce59
|
|
@ -59,9 +59,12 @@ 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'))
|
||||
"MAX_OVERFLOW": int(self.get('DB_MAX_OVERFLOW')),
|
||||
'RECYCLE': 1800,
|
||||
'TIMEOUT': 30
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue