Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php): failed to open stream: No such file or directory in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24

Warning: include(): Failed opening '/home/blog66rr/public_html/wp-content/plugins/hyper-cache/cache.php' for inclusion (include_path='.:/opt/cpanel/ea-php70/root/usr/share/pear') in /home/blog66rr/public_html/wp-content/advanced-cache.php on line 24
mysql資料庫的負回授狀況,導致網站異常 – unethost無限空間虛擬主機 技術分享部落格

mysql資料庫的負回授狀況,導致網站異常

internet_server_error

這幾天遇到連假,不過我們客服團隊還是不得閒,
如果遇到主機的緊急事務,就會輪班處理。

源由:
今天這個錯誤訊息,可能是大家相當常見地,
主要是頁面瀏覽會出現下列的錯誤訊息:

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 負回授的狀況,
所形成的崩潰現像,如果沒有相當的經驗,
可能會查的很辛苦。

 

(本篇教學由unethost.com客服撰寫)

延伸閱讀:如何備份Cpanel後台安裝的套裝程式?

安裝上述的軟體,我們提供虛擬主機試用,七天滿意保證,
功能完整使用不受限制,歡迎點我申請。