简体   繁体   中英

Random MySQL errors?

I installed a handy little script on a website. When in localhost, there are never any errors; however, when I am hosting it on my VPS, I occasionally and purely randomly get MySQL errors, and I think it is murdering my traffic. Is this happening because of a bad VPS, or are there other reasons?

Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in /home/freetrav/public_html/travian/GameEngine/Database/db_MYSQL.php on line 1383

Lost connection to MySQL server during query

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/freetrav/public_html/travian/GameEngine/Database/db_MYSQL.php on line 17 Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

MySQL server has gone away

All these are purely random and none are permanent. They usually happen when there are many pages open at once, and they log the current account out.

Sounds like MySQL is crashing. If you can see the mysqld error logs, that would confirm it.

That is definietly a sign of a bad installation of mysql on your VPS.

Your hosting service provider is who you should talk to to have this fixed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM