504 Gateway Timeout Error 502 Bad Gateway
总结
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
- Retry the web page by clicking the refresh/reload button, pressing F5, or trying the URL from the address bar again.
- 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.
- Restart all of your network devices. Temporary problems with your modem, router, switches, or other networking hardware could be causing the 504 Gateway Timeout issue you're seeing. Just restarting these devices could help.
- 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.
- Check the proxy server settings in your browser or application and make sure they're correct. Incorrect proxy settings can cause 504 errors.
- 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.
- Note: Most computers do not have proxy settings at all, so if yours are empty, don't worry, just skip this step.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- Tip: See How to Talk to Tech Support for tips on talking to your Internet Service Provider about this problem.
- 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.
- 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.
504 Gateway Timeout Error 502 Bad Gateway的更多相关文章
- 解决 504 Gateway Time-out和502 Bad Gateway(nginx)
504 Gateway Time-out 问题所在: 所请求的网关没有请求到,简单来说就是没有请求到可以执行的PHP-CGI. 一般看来, 这种情况可能是由于nginx默认的fastcgi进程响应的缓 ...
- 504 Gateway Time-out 和 502 Bad Gateway相关处理
若报:504 Gateway Time-out则与nginx有关 解决方案: #vim nginx.conf 添加以下代码: http{ fastcgi_connect_timeout 300; fa ...
- Nginx 502/504 Gateway time-out错误完美解决方案【转发】
在安装完Nginx+PHP-fpm+Mysql后,跑PHP的应用会经常出现504 Gateway Time-out 或者502 Bad Gateway的情况. Nginx 504 Gateway ...
- nginx出现504 Gateway Time-out的解决思路
http://www.xbc.me/nginx-fix-504-gateway-timeout/ 在安装完Nginx+PHP-fpm+Mysql后 (如何安装LNMP环境,请参考快速配置LNMP环境N ...
- 解决 502、504 Gateway Time-out(nginx)
一.504 Gateway Time-out问题常见于使用nginx作为web server的服务器的网站 我遇到这个问题是在升级discuz论坛的时候遇到的 一般看来, 这种情况可能是由于nginx ...
- Nginx + php-fpm 执行 PHP 脚本超时 报错 502 Bad Gateway + 504 Gateway Time-out 的解决办法
上周写好的发送邮件的计划任务只发送了一部分,检查计划任务日志,发现 502 Bad Gateway 的错误(已经在脚本中设置了 set_time_limit(0)). 后来在网上查找资料,可以通过以下 ...
- 记一次接口504 Gateway Time-out原因及解决方法
今天在刷新公司项目页面时发现有个板块一直刷新不出数据,最后发现接口报错(504 Gateway Time-out) 通过查看代码发现有个sql语句,如下,特别慢 select `vdc1`, ...
- Nginx报504 gateway timeout错误的解决方法
转载文章来源:http://www.111cn.net/sys/nginx/90669.htm(若侵删) Nginx报504 gateway timeout错误引起,一个是文件配置问题,另一个是相关处 ...
- WDCP LNMPA和LNMP 504 Gateway time-out错误的解决方法
Nginx的特点是处理静态很给力,Apache的特点是处理动态很稳定,两者结合起来便是LNMPA,nginx处理前端,apache处理后端,这样处理静态会很快,处理动态会很稳定.当我以为安装完成以后便 ...
随机推荐
- CentOS 6.9编译安装Python-2.7.14(python升级)
参考 Python官网:https://www.python.org/ 阿里云 https://www.aliyun.com/jiaocheng/517192.html 一.查看CentOS版本和系统 ...
- OS | 死锁
死锁的四个条件 互斥 占用等待 非剥夺 循环等待 死锁的解决方案 死锁预防 间接预防:防止前三个条件中的任何一个的发生 直接预防:防止循环等待的发生 死锁避免 进程启动拒绝:不启动任何一个可能发生死锁 ...
- Git 详细的操作指南笔记
喜欢的朋友start一下,长期更新文章 设置 安装git后我们需要配置一下,告诉git我们的基本信息等等..一般在用户范围内去配置 git ,也就是在 global 范围. global 全局设置 $ ...
- Xshell 初次应用
以前就想安装Xshell,今天终于弄好了,可以在windows下对Linux服务端进行管理. 关于SSH和Xshell的介绍见参考,Linux上安装的是ssh服务端,所以咱们如果希望通过远程访问的方式 ...
- 性能测试脚本开发(LR.NET控件)
性能测试过程中,最耗费经历的就是编写性能测试脚本的过程,在大部分的测试工具中都是采用录制的方式,通过录制产生脚本,然后根据需要进行修改,以及参数化.有些时候为了能够完成某一个功能的脚本,需要将录制下来 ...
- kill -signal
1. SIGHUP 启动被终止的进程,可让该PID重新读取配置文件,类似于重启服务 对应的数字为1 9.SIGTERM 以正常的结束进程来终止进程 15.SIGSTOP 暂停一个进程相当于crtl+z
- jmeter之怎样减负-实现稳定超高并发測试(性能调优)
新浪围脖>@o蜗牛快跑o 在測试过程中,刚開始学习的人(也包含早期的我),使用工具不当,加入众多监控组件,很想看到实时报告.跑不了一会,jmeter就卡死甚至oom.仅仅得重新启动.之前的 ...
- Android Design Support Library(2)- TextInputLayout的使用
原创文章,转载请注明 http://blog.csdn.net/leejizhou/article/details/50494634 这篇文章介绍下Android Design Support Lib ...
- Docker 三大核心工具
Docker-machineDocker Machine是一个简化Docker安装的命令行工具,通过一个简单的命令行即可在相应的平台上安装Docker,比如VirtualBox. Digital Oc ...
- bit-map再显身手:test.txt中有42亿个无符号整数, 求不存在于test.txt中的最小无符号整数。限制: 可用内存为600MB.
先看看这个题目:test.txt中有42亿个无符号整数, 求不存在于test.txt中的最小无符号整数. 限制: 可用内存为600MB. 又是大数据. 看到42亿, 有灵感没? 要知道, 2的32次方 ...