我有一个OpenCart网站,其中包含一堆带有加密文件的插件。随着我添加越来越多的产品(目前为150k),它变得越来越慢了。慢点。由于我无法更改查询(文件已加密),我不得不更改我的一些表格'存储引擎到MEMORY。我的查询时间从50秒到2秒。
但是有一个新问题。如果我尝试在DB服务器崩溃的同时打开4或5页。这是一个托管的VPS,因此我无法访问所有内容。托管的支持根本没有帮助,并告诉我不要使用MEMORY,因为它不兼容!
我在localhost上有完全相同的设置(唯一不同的是webhost是MariaDB但我在我的localhost上使用MySQL)并且我无法重现错误,我尝试了多少。
以下是OpenCart中的错误日志:
2018-04-26 22:32:42 - PHP Warning: mysqli::query(): MySQL server has gone away in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: mysqli::query(): Error reading result set's header in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: Error while sending QUERY packet. PID=26733 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: mysqli::query(): (00000/0): in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: mysqli::query(): MySQL server has gone away in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: mysqli::query(): Error reading result set's header in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: mysqli::query(): MySQL server has gone away in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: mysqli::query(): Error reading result set's header in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Notice: Trying to get property of non-object in /home/grdrop/public_html/catalog/model/extension/module/yumenu.php on line 163
2018-04-26 22:32:42 - PHP Warning: Error while sending QUERY packet. PID=26732 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: Error while sending QUERY packet. PID=26718 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: Error while sending QUERY packet. PID=26722 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: Error while sending QUERY packet. PID=26730 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: Error while sending QUERY packet. PID=26725 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:42 - PHP Warning: Error while sending QUERY packet. PID=26726 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:43 - PHP Warning: Error while sending QUERY packet. PID=26734 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:43 - PHP Warning: Error while sending QUERY packet. PID=26724 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:43 - PHP Warning: Error while sending QUERY packet. PID=26727 in /home/grdrop/public_html/system/library/db/mysqli.php on line 18
2018-04-26 22:32:44 - PHP Warning: mysqli::__construct(): (HY000/2002): Connection refused in /home/grdrop/public_html/system/library/db/mysqli.php on line 7
2018-04-26 22:32:44 - PHP Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /home/grdrop/public_html/system/library/db/mysqli.php on line 10
2018-04-26 22:32:44 - PHP Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /home/grdrop/public_html/system/library/db/mysqli.php on line 10
2018-04-26 22:32:44 - PHP Warning: mysqli::__construct(): (HY000/2002): Connection refused in /home/grdrop/public_html/system/library/db/mysqli.php on line 7
2018-04-26 22:32:44 - PHP Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /home/grdrop/public_html/system/library/db/mysqli.php on line 10
2018-04-26 22:32:44 - PHP Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /home/grdrop/public_html/system/library/db/mysqli.php on line 10
2018-04-26 22:32:45 - PHP Warning: mysqli::__construct(): (HY000/2002): Connection refused in /home/grdrop/public_html/system/library/db/mysqli.php on line 7
2018-04-26 22:32:45 - PHP Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /home/grdrop/public_html/system/library/db/mysqli.php on line 10
2018-04-26 22:32:45 - PHP Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /home/grdrop/public_html/system/library/db/mysqli.php on line 10
2018-04-26 22:32:45 - PHP Warning: mysqli::__construct(): (HY000/2002): Connection refused in /home/grdrop/public_html/system/library/db/mysqli.php on line 7
2018-04-26 22:32:45 - PHP Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /home/grdrop/public_html/system/library/db/mysqli.php on line 10
2018-04-26 22:32:45 - PHP Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /home/grdrop/public_html/system/library/db/mysqli.php on line 10
2018-04-26 22:32:45 - PHP Warning: mysqli::__construct(): (HY000/2002): Connection refused in /home/grdrop/public_html/system/library/db/mysqli.php on line 7
我对DBs&amp ;;不太了解我完全迷失在这里。如果这是与内存相关的问题,那么我可以更改变量或设置,以便数据库等到第一次查询完成后才会发生。当有足够的RAM时继续?