Nginx 502 Bad Gateway 排查


1年前 499次点击 来自 Linux

502错误码其实并不常见,昨天在遇到的时候并没有思路去排查,参考以下博文后,顺利检查出问题所在:
How to Fix a 502 Bad Gateway Error on Your WordPress Site
How to Solve 502 Bad Gateway Issues?

简单的排查步骤如下:

How to solve 502 errors as a web developer

As a web developer or owner of the website, there are a few reasons why you may be experiencing a 502 Bad Gateway error on your origin server. Therefore, you may need to try various methods to resolve the issue. Reference the list of suggestions below:

  • Check if your FQDN (fully qualified domain name) is resolving correctly by using our DNS test tool.
  • Verify if your server is reachable by using a ping test or traceroute.
  • Check your firewall logs if you are seeing unusual drops.
  • If you're a Cloudflare user, try disabling it as once you've reached a certain limit Cloudflare will return a 502 Bad Gateway error to your visitors.

笔者最后排查出nginx服务器正常,api服务器因未知原因掉了,重启完事~

Made with in Shangrao,China By Devler.

Copyright © Devler 2012 - 2022

赣ICP备19009883号-1