Apache的502错误 - 服务器挂机 [英] Apache 502 Error - Server Hang up
问题描述
我使用的EC2实例(T2中)与Apache,MySQL和PHP。我收到定期502(服务器挂机)错误。试图找到从本周一的解决方案,但都没有能够解决这个问题。
I am using EC2 instance (t2 Medium) with Apache, MySQL and PHP. I am getting on regular basis 502(Server Hangup) error. Trying to find a solution from week but didn't able to resolve it.
我使用 mpm_ prefork
与服务器配置。
<IfModule mpm_prefork_module>
StartServers 15
MinSpareServers 15
MaxSpareServers 25
MaxRequestWorkers 200
MaxConnectionsPerChild 1000
</IfModule>
也没能看到502状态code。在访问和放大器;错误日志。
Also not able to see 502 status code in access & error logs.
任何建议将是非常有益的。
Any suggestion will be very helpful.
推荐答案
一般实例状态检查将验证您的实例的操作系统是接受流量。
Generally 'Instance Status Check' verifies that your instance's operating system is accepting traffic.
当它失败就意味着实例中的操作系统不响应的流量,例如,当一个Windows实例挂起或会发生这种情况时,一个Linux实例内核恐慌或网络的实例中禁用。
When it fails it means that the operating system inside the instance is not responding to traffic, for example this can happen when a Windows instance hangs or when a Linux instance kernel panics or network is disabled inside the instance.
502错误网关也可能是Web服务器没有响应及时的方式,这是符合事实的CloudWatch已录常数100%的CPU使用率的情况下的一个标志。
"502 Bad Gateway" could also be a sign of the webserver not responding in timely manner, which is in line with the fact that CloudWatch has recorded constant 100% CPU usage for your instance.
鉴于您的实例是t.micro例如,如果高负载是合法的,你可能要考虑迁移到类似的m1.small例如一个更大的实例类型。
Given the fact that your instance is a t.micro instance, if the high load is legitimate you may want to consider migrating to a larger instance type like m1.small for example.
这篇关于Apache的502错误 - 服务器挂机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!