fix: 8001 端口冲突修复脚本,防止双开 gunicorn 卡死全站
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -27,6 +27,12 @@ NG=$(pgrep -cf 'gunicorn.*a_long_dianjing' 2>/dev/null || echo 0)
|
||||
if [ "$NG" -gt 8 ]; then
|
||||
echo ">>> 警告: gunicorn 进程过多($NG),可能 systemd + 1Panel 双开,必须只留 systemd"
|
||||
fi
|
||||
RECENT=$(grep -a 'Connection in use' /tmp/gunicorn-error.log 2>/dev/null | tail -1)
|
||||
if [ -n "$RECENT" ]; then
|
||||
echo ">>> 警告: error.log 曾出现 8001 端口冲突(双开 gunicorn):"
|
||||
echo " $RECENT"
|
||||
echo " 执行: bash deploy/fix-gunicorn-8001-conflict.sh"
|
||||
fi
|
||||
if grep -q 'worker_class.*sync' "$CONF" 2>/dev/null; then
|
||||
echo ">>> 致命: gunicorn.conf.py 仍是 sync,全站会卡死,必须改为 gthread 并 restart"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user