Internal Server Error mysql负回收导致网站异常

来源:互联网 发布:标准数据公司 编辑:程序博客网 时间:2024/05/21 22:42
源由:


  今天这个错误讯息,可能是大家相当常见地,


  主要是页面浏览会出现下列的错误讯息:


  Internal Server Error


  The server encountered an internal error or misconfiguration and was unable to complete your request.


  Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.


  More information about this error may be available in the server error log.


  Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.



  看到字面意思,绝对无法想象里面有很多种不同的出错因素:


  遇到这样的状况,如何检查呢?


  1.直接查看log日志


  2.检查 .htaccess 是否有写错


  3.检查是否被cc攻击(连线数是否异常)


  4.排除硬件问题


  以上检查完,竟都没有发现到问题的部份,所以得持续下一步,也就是环境检查。


  环境检查:


  该网站是靠两部主机进行资源分流,一部跑web,一部跑mysql,


  所以我们怀疑问题可能是出在另一部,这时检查很快速,


  直接让两部主机先互ping,看看资料是否可以正常传送,


  ping的通在去作其他检查;因此查出问题了,


  原来mysql这部的iptables出现问题,导致web server


  连不过来。


  解决方式:


  先关闭iptables,确定网页开启已经没问题了,在来重新设定规则。


  结论:


  以往资料库连不上的话,程式都会出现相关提示,所以很容易排除。


  本次的状况相当特殊,server 内所有的service 的启动及执行都相当正常,


  但不光是php无法执行,连html都无法输出。


  因此判断出,这是一种mysql 负回授的状况,


  所形成的崩溃现像,如果没有相当的经验,


  可能会查的很辛苦。
原创粉丝点击