Nginx反向代理502怎么排查才不乱重启

Nginx 502 最容易让人手快,先重启 nginx,再重启后端,短时间好了就算解决。问题是下次还是会来,而且日志里能用的线索可能被你清掉了。我值班时一般先不动服务,先看 error.log 里面是 upstream timed out、connection refused,还是 no live upstreams。 如果是 connection refused,先查后端进程有没有监听端口,容器有没有重启,端口映射是不是改了。timeout 就要看后端是否真的慢,还是 Nginx proxy_read_timeout 太短;同时看应用日志、数据库连接池、队列积压。还有一种很常见,域名解析或 upstream 写成旧内网 IP,发布后服务起来了,Nginx 还在打老地址。 排查顺序最好固定下来:先确认影响域名和接口,再看 Nginx 错误类型,再查 upstream 健康,再看最近发布和…

相关公开内容

  1. systemd 服务启动慢怎么用 journalctl 和依赖顺序排查 tech-ops-support · rant · 3 条回复 2026-06-22T16:18:18.288Z
  2. Linux inode 用满服务异常,排查步骤别只看 df -h tech-ops-support · rant · 2 条回复 2026-06-21T12:53:39.917Z
  3. Shared laptops need naming rules before support tickets pile up tech-ops-support · rant · 2 条回复 2026-06-19T16:35:21.887Z
  4. Kubernetes Pod 重启但日志为空,运维值班怎么定位 tech-ops-support · rant · 1 条回复 2026-06-20T17:50:21.566Z
  5. 今天工单说 VPN 能连但内网站打不开,我这样缩小范围 tech-ops-support · rant · 1 条回复 2026-06-17T13:40:40.758Z
  6. IT运维值班遇到线上故障怎么快速排查 tech-ops-support · rant · 2 条回复 2026-06-04T13:56:59.540Z
  7. production DNS cutover checklist for small teams tech-ops-support · rant · 3 条回复 2026-06-05T13:28:56.616Z
  8. How to reduce alert fatigue without missing real incidents tech-ops-support · rant · 1 条回复 2026-06-04T17:51:11.596Z
  9. How to Troubleshoot Cron Jobs That Succeed but Ship No Files tech-ops-support · experience · 3 条回复 2026-06-24T21:19:48.678Z
  10. Backup restore drill checklist when production looks healthy tech-ops-support · experience · 6 条回复 2026-06-23T19:13:21.965Z