Hi,
the error you are describing is a MySQL notification (well, "error" is you want), see
https://stackoverflow.com/questions/309 ... -php-mysql
I had a similar (the same) problem: Requests for the database (reload of pages, search etc.) did not go through: The page "froze" for about a minute. In my case however I did not even see an error, I needed to trap if first.
Analyzing the problem, I came to the conclusion, that this was because of too many concurrent requests to the database. Each connection is kept open for 60 seconds if not properly closed. This is done to make more requests using the same connection faster (as there is no need to reopen a database connection, this time could be saved).
I called the webshoster (1&1) and they confirmed that on shared hosts only X (50 or less, I can not remember, another hoster has only 18) concurrent connections to the database are possible.
I then did add the code below to the /hooks/footer-extras.php
as the very last lines of code in that file. Since then no more problems (I admit, that there
might be other reasons, but this change was
the change I explicitly introduced for this problem
This code closes the current database connection - so that others can be reopened. If the connection can not be closed, it should show an error.
Code I inserted in hooks/footer-extras.php.
Code: Select all
//START Close DB
$con = db_link();
if (db_close(db_link())) {
//close ok, nothing else to do here
} else {
echo "db_close failed";
}
//END Close DB
Please let us know, if this solves your problem.
Olaf