简体   繁体   English

随机的MySQL错误?

[英]Random MySQL errors?

I installed a handy little script on a website. 我在网站上安装了一个方便的小脚本。 When in localhost, there are never any errors; 在localhost中时,永远不会有任何错误。 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. 但是,当我将其托管在VPS上时,偶尔偶尔会纯粹收到MySQL错误,并且我认为这正在扼杀我的流量。 Is this happening because of a bad VPS, or are there other reasons? 这是由于VPS不好造成的,还是有其他原因?

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 警告:mysql_fetch_row()期望参数1为资源,在1383行的/home/freetrav/public_html/travian/GameEngine/Database/db_MYSQL.php中给出布尔值

Lost connection to MySQL server during query 查询期间失去与MySQL服务器的连接

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_connect()[function.mysql-connect]:无法通过套接字/ home / freetrav / public_html / travian / GameEngine /中的套接字'/var/lib/mysql/mysql.sock'(2)连接到本地MySQL服务器第17行的Database / db_MYSQL.php无法通过套接字'/var/lib/mysql/mysql.sock'(2)连接到本地MySQL服务器

MySQL server has gone away MySQL服务器不见了

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. 听起来像MySQL崩溃了。 If you can see the mysqld error logs, that would confirm it. 如果您可以看到mysqld错误日志,那就可以确认。

That is definietly a sign of a bad installation of mysql on your VPS. 这绝对是您的VPS上mysql安装错误的标志。

Your hosting service provider is who you should talk to to have this fixed. 您应该与您的托管服务提供商联系以解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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