fix: 禁用DB SSL连接,修复gunicorn preload_app导致的连接池损坏

This commit is contained in:
freedakgmail
2026-07-17 19:12:58 +08:00
parent 9c7d7abdd4
commit 04f8b9f951
2 changed files with 86 additions and 21 deletions
+15
View File
@@ -0,0 +1,15 @@
"""Gunicorn 生产环境配置"""
import multiprocessing
bind = "0.0.0.0:3333"
workers = min(multiprocessing.cpu_count() * 2 + 1, 4)
worker_class = "gthread"
threads = 4
timeout = 120
keepalive = 5
max_requests = 1000
max_requests_jitter = 50
accesslog = "-"
errorlog = "-"
loglevel = "info"
preload_app = False