perf(douyu): 消除任务锁竞争并增加创建背压

This commit is contained in:
yml
2026-11-19 22:01:21 +08:00
parent 62cb0a41ec
commit 09cdf3f2eb
11 changed files with 555 additions and 95 deletions
+6
View File
@@ -68,6 +68,12 @@ DB_POOL_SIZE=20
DB_MAX_OVERFLOW=20
DB_POOL_TIMEOUT=30
DB_POOL_RECYCLE=1800
# 行锁 10 秒仍未拿到就失败,避免把连接池和请求线程长期堵住。
DB_LOCK_WAIT_TIMEOUT=10
# 斗鱼批次创建并发与全局活跃量背压。
DOUYU_BATCH_CREATE_CONCURRENCY=2
DOUYU_MAX_ACTIVE_BATCHES=20
DOUYU_MAX_ACTIVE_TASKS=250
# Cookie 安全标志(生产环境 HTTPS 部署时设为 true)
COOKIE_SECURE=false