我经常得到这个错误,php_error日志文件每2秒增加1MB。 而且网站很慢。
我试图将此行添加到wp-db.php
$this->query("set session wait_timeout=600" );但它没有帮助。
Web服务器是IIS 7,最新版本的mysql和wordpress
I get this error so frequently that the php_error log file increases 1MB every 2 seconds. and the site is very slow.
I have tried to add this line to wp-db.php
$this->query("set session wait_timeout=600" );but it did not help.
The web server is IIS 7, latest version of mysql and wordpress
最满意答案
这个技巧适用于所有WordPress版本。 打开Wordpress目录。 该目录将包含文件夹:
wp-admin wp-content wp-includes打开wp-includes。 搜索wp-db.php文件。 如果找到该文件,请使用文本编辑器将其打开。 使用文本编辑器的搜索工具,搜索:
$this->ready = true;找到该行后,在找到的行之后添加以下行:
//WP Query Gone Away Error Fix $this->query("set session wait_timeout=600");您还可以按照https://subinsb.com/fix-wordpress-error-mysql-server-has-gone-away链接查看更多detials。
This trick will work for all WordPress versions. Open your Wordpress directory. The directory will contain the folders :
wp-admin wp-content wp-includesOpen wp-includes. Search for the wp-db.php file. If you found the file, open it using a text editor. Using the text editor's search tool, search for :
$this->ready = true;Once you found the line, add the following lines just after the found line :
//WP Query Gone Away Error Fix $this->query("set session wait_timeout=600");You can also follow https://subinsb.com/fix-wordpress-error-mysql-server-has-gone-away link to view in more detials.
更多推荐
发布评论