解決MySQL錯誤:Too many connections

連接風信網官網 http://www.ithov.com 突然出現如下錯誤: mysql Error Message: Can not connect to MySQL server SQL: Error: Too many connections Errno.: 1040 Click here to seek help. 連接數超過了 MySQL 設置的值,與 max_connections 和 wait_time

連接風信網官網  突然出現如下錯誤:

MySQL Error
Message: Can not connect to MySQL server
SQL:
Error: Too many connections
Errno.: 1040
Click here to seek help.

連接數超過了 MySQL 設置的值,與 max_connections 和 wait_timeout? 都有關系。wait_timeout 的值越大,連接的空閑等待就越長,這樣就會造成當前連接數越大。

解決方法:

1、虛擬主機用戶請聯系空間商優化 MySQL 的配置;

2、獨立主機用戶請聯系服務器管理員優化 MySQL 服務器的配置,可參考:

修改 MySQL 配置文件(Windows下為 my.ini, Linux下為 my.cnf )中的參數:

max_connections= 1000
wait_timeout = 5

如果沒有可以自行添加,修改后重啟 MySQL ,如果經常性的報此錯誤,請做一下服務器的整體優化。

? 版權聲明
THE END
喜歡就支持一下吧
點贊5 分享