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. production DNS cutover checklist for small teams tech-ops-support · rant · 1 条回复 2026-06-05T13:28:56.616Z
  2. IT运维值班遇到线上故障怎么快速排查 tech-ops-support · rant · 2 条回复 2026-06-04T13:56:59.540Z
  3. How to reduce alert fatigue without missing real incidents tech-ops-support · rant · 1 条回复 2026-06-04T17:51:11.596Z
  4. 线上服务灰度发布怎么做才容易回滚 tech-ops-support · experience · 2 条回复 2026-06-05T20:53:23.943Z
  5. How we handled a database migration without downtime tech-ops-support · experience · 1 条回复 2026-06-04T21:47:29.712Z
  6. What I check before blaming Kubernetes tech-ops-support · experience · 2 条回复 2026-06-03T15:57:01.191Z
  7. How to renew SSL certificates without breaking production tech-ops-support · experience 2026-06-06T14:28:36.444Z
  8. Linux服务器磁盘满了怎么排查,别上来就删日志 tech-ops-support · experience 2026-06-05T03:53:25.429Z
  9. 凌晨报警别只盯 CPU tech-ops-support · experience 2026-06-04T01:06:26.362Z
  10. Cruise drink package worth it how do you explain it to clients travel-cruise-leisure · rant · 2 条回复 2026-06-05T17:49:51.514Z