Mysql errors - probably sqlite template?

The website loads slow sometimes so I asked the hosting company if it’s a server problem. But it seems that the real time error log displays the following:


PHP Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in /home/mp/public_html/core/db/mysql.php on line 53<br />
PHP Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/mp/public_html/core/db/mysql.php on line 57<br />
PHP Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/mp/public_html/core/db/mysql.php on line 57<br />
PHP Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /home/mp/public_html/core/db/mysql.php on line 64<br />
PHP Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/mp/public_html/core/db/mysql.php on line 127
```<br />
<br />
and other errors. We did not make any changes to the mysql.php file, so we are a bit surprised to see the errors. Could this be related to the cache? I set it up to use sqlite a few months ago.<br />
<br />
How can I turn off the cache? Just use "Development mode" from administration panel? We had many problems with the 'file system' caching, once it reached 10,000 files on the server. Now, we switched to sqlite and I'm afraid that this could the cause for the errors.<br />
<br />
Any help would be appreciated.<br />
Thank you.

Unless you've changed the backend_cache method to be 'mysql' (which I would STRONGLY NOT recommend), the cache has nothing to do with mySQL other than it reading info from the DB to put into the cache. Additionally, SQLITE has nothing to do with mySQL either.



I would guess you either have a problem with your site configuration or you have modified some standard files which are causing the mysql error. Be interesting to see a backtrace of one of those issues to see where it's being called from.

Thank you for your reply. I'm using sqlite as a caching method, so this should not cause the problems then.



Unfortunately the problem doesn't appear when doing a sequence of things or when I click on a link. I've tested the entire process of adding to cart, removing, creating an account, checkout, edit account, etc. and I can't manage to break it. Considering that I have 300-500 visitors a day, it's hard to know/reproduce what they are doing. Or it could be something in the admin panel.



Hopefully I will find it and see what causes the problem. I will post any conclusions here.

OK, I asked in 3 different places (including the cs-cart helpdesk) and got 3 similar answers.

It's a server problem: MySQL :: MySQL 8.0 Reference Manual :: B.3.2.7 MySQL server has gone away and I should contact the hosting.



So if anyone has random mysql errors, this is the problem.