fix: MySQL 空闲连接健康检查 + Gunicorn worker 保活,解决广播开才不卡

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-07-09 04:49:08 +08:00
parent 9e61161a5c
commit c4244ad423
4 changed files with 30 additions and 0 deletions

View File

@@ -126,6 +126,7 @@ DATABASES = {
'PASSWORD': app_secrets.DATABASE_PASSWORD,
'PORT': app_secrets.DATABASE_PORT,
'CONN_MAX_AGE': 600,
'CONN_HEALTH_CHECKS': True,
'OPTIONS': {
'charset': 'utf8mb4',
'init_command': "SET time_zone='+08:00'",