总结

1、

502没有收到相应,或者收到了但不及时? cannot get a response in time

540收到了无效的响应 received an invalid response from the upstream server,

HTTP/1.1: Status Code Definitions https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10

10.5 Server Error 5xx

Response status codes beginning with the digit "5" indicate cases in which the server is aware that it has erred or is incapable of performing the request. Except when responding to a HEAD request, the server SHOULD include an entity containing an explanation of the error situation, and whether it is a temporary or permanent condition. User agents SHOULD display any included entity to the user. These response codes are applicable to any request method.

10.5.1 500 Internal Server Error

The server encountered an unexpected condition which prevented it from fulfilling the request.

10.5.2 501 Not Implemented

The server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.

10.5.3 502 Bad Gateway

The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.

10.5.4 503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay MAY be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response.

      Note: The existence of the 503 status code does not imply that a
server must use it when becoming overloaded. Some servers may wish
to simply refuse the connection.

10.5.5 504 Gateway Timeout

The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server specified by the URI (e.g. HTTP, FTP, LDAP) or some other auxiliary server (e.g. DNS) it needed to access in attempting to complete the request.

      Note: Note to implementors: some deployed proxies are known to
return 400 or 500 when DNS lookups time out.

10.5.6 505 HTTP Version Not Supported

The server does not support, or refuses to support, the HTTP protocol version that was used in the request message. The server is indicating that it is unable or unwilling to complete the request using the same major version as the client, as described in section 3.1, other than with this error message. The response SHOULD contain an entity describing why that version is not supported and what other protocols are supported by that server.

 

Cause of 502 Bad Gateway Errors

Bad Gateway errors are often caused by issues between online servers that you have no control over. However, sometimes, there is no real issue but your browser thinks there is one thanks to an issue with your browser, a problem with your home networking equipment, or some other in-your-control reason.

 

Microsoft IIS web servers often give more information about the cause of a particular 502 Bad Gateway error by adding an extra digit after the 502, as in HTTP Error 502.3 - Web server received an invalid response while acting as a gateway or proxy, which means Bad Gateway: Forwarder Connection Error (ARR). You can see a complete list here.

An HTTP Error 502.1 - Bad Gateway error refers to a CGI application timeout problem and is better to troubleshoot as a 504 Gateway Timeout issue.

The HTTP status code in IIS 7.0, IIS 7.5, and IIS 8.0 https://support.microsoft.com/en-us/help/943891/the-http-status-code-in-iis-7-0-iis-7-5-and-iis-8-0

How to Fix the 504 Gateway Timeout Error

  1. Retry the web page by clicking the refresh/reload button, pressing F5, or trying the URL from the address bar again.
    1. Even though the 504 Gateway Timeout error is reporting an error outside of your control, the error might only be temporary. Simply retrying the page is a quick and easy thing to try.
  2. Restart all of your network devices. Temporary problems with your modem, routerswitches, or other networking hardware could be causing the 504 Gateway Timeout issue you're seeing. Just restarting these devices could help.
    1. Tip: While the order you turn off these devices isn't important, the order that you turn them back on is. In general, you want to turn devices on from the outside-in. If you're not sure what that means, check out the link at the beginning of this step for a complete tutorial.
  3. Check the proxy server settings in your browser or application and make sure they're correct. Incorrect proxy settings can cause 504 errors.
    1. Tip: See Proxy.org for an updated, respected list of proxy servers that you can choose from. There are also several websites that offer free proxy server list downloads.
    2. Note: Most computers do not have proxy settings at all, so if yours are empty, don't worry, just skip this step.
 
  1. Change your DNS servers. It's possible that the 504 Gateway Timeout error you're seeing is caused by an issue with the DNS servers you happen to be using.
    1. Note: Unless you've previously changed them, the DNS servers you have configured right now are probably the ones automatically assigned by your ISP. Fortunately, a number of other DNS servers are available for your use that you can choose from. See our Free & Public DNS Servers list for your options.
    2. Tip: If not all your network devices are getting an HTTP 504 error but they're all on the same network, changing your DNS servers probably isn't going to work. If this sounds like your situation, move on to the next idea.
  2. If nothing has worked up to this point, contacting the website is probably the next best thing to do. There's a good chance the website administrators are already working to fix the root cause of the 504 Gateway Timeout error, assuming they're aware of it, but there's nothing wrong touching base with them.
    1. See our Website Contact Information page for help figuring out how to contact popular websites. Most major sites have social networking accounts they use to help support their services and some even have telephone numbers and email addresses.
    2. Tip: If it's starting to look like the website might be giving a 504 error for everyone, searching Twitter for real-time information about the site's outage is often helpful. The best way to do this is to search for #websitedown on Twitter. For example, if Facebook might be down, search #facebookdown.
 
  1. Contact your Internet Service Provider. It's very likely at this point, after following all the troubleshooting above, that the 504 Gateway Timeout that you're seeing is a problem caused by a network issue that your ISP is responsible for.
    1. Tip: See How to Talk to Tech Support for tips on talking to your Internet Service Provider about this problem.
  2. Come back later. You've exhausted all your options at this point and the 504 Gateway Timeout error is either in the hands of the website or your ISP to correct.
    1. Check back with the site regularly. No doubt it'll start working again soon.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504

The HyperText Transfer Protocol (HTTP) 504 Gateway Timeout server error response code indicates that the server, while acting as a gateway or proxy, cannot get a response in time.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502

The HyperText Transfer Protocol (HTTP) 502 Bad Gateway server error response code indicates that the server, while acting as a gateway or proxy, received an invalid response from the upstream server.

最新文章

  1. 在Page_Loaded下删除PivotItem出错的解决方案
  2. H5页面左图右边文字如何布局
  3. problem 1 -- Two sum
  4. Lua table pair和ipair区别
  5. Linux的标准输出、标准错误输出、nohup
  6. hdu 5540 Secrete Master Plan(水)
  7. 线程(java课堂笔记)
  8. c语言学习笔记 —— 数组
  9. 大数据 --> MapReduce原理与设计思想
  10. 使用Libgdx开发的FlappyBird(像素鸟、疯狂的小鸟)游戏源码
  11. nginx与Elasticsearch结合使用
  12. Spring MVC中用@ResponseBody转json,对json进行处理方法汇总
  13. cf1061E Politics (费用流)
  14. Lua C/C++互相调用
  15. 倒数第N个字符串
  16. Chrome英文版离线安装包下载
  17. BZOJ4408: [Fjoi 2016]神秘数【主席树好题】
  18. 有关动态规划(主要是数位DP)的一点讨论
  19. 从零开始--Spring项目整合(1)使用maven框架搭建项目
  20. java.lang.IllegalArgumentException: Document base F:\personal\projects\annoMVC\web does not exist or is not a readable directory

热门文章

  1. [XJOI-NOI2015-13-C]白黑树
  2. [BUG] CS0234: 命名空间“System.Web.Mvc”中不存在类型或命名空间名称“Ajax”(是否缺少程序集引用?)
  3. 为Zepto添加Slide动画效果
  4. 真正解决 thinkphp 验证码 出错 无法显示 问题
  5. FTP的主动模式与被动模式
  6. 关于Blind XXE
  7. Java数组去掉反复的方法集
  8. MFC中几个函数的使用
  9. Linux ps 命令查看进程启动及运行时间
  10. 字符串(string)操作的相关方法