fix: MySQL 空闲连接健康检查 + Gunicorn worker 保活,解决广播开才不卡
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -16,6 +16,14 @@ sleep 2
|
||||
systemctl is-active gunicorn-dianjing.service
|
||||
pgrep -cf 'gunicorn.*a_long_dianjing' || true
|
||||
|
||||
echo ""
|
||||
echo ">>> 安装 worker 保活 cron(空闲后不卡)"
|
||||
chmod +x deploy/gunicorn-warmup.sh
|
||||
cp deploy/gunicorn-warmup.cron /etc/cron.d/gunicorn-warmup
|
||||
chmod 644 /etc/cron.d/gunicorn-warmup
|
||||
bash deploy/gunicorn-warmup.sh
|
||||
echo " cron 已安装,每2分钟预热 worker"
|
||||
|
||||
echo ""
|
||||
echo ">>> 最近慢请求 (rt>=0.5s):"
|
||||
grep -a 'hqhd' "$NGINX_LOG" | awk 'match($0,/rt=([0-9.]+)/,a){if(a[1]+0>=0.5)print}' | tail -5
|
||||
|
||||
Reference in New Issue
Block a user