We switched to mod_ruid2 and have started having significant db connection problems. Getting allot of errors:CRI: Query Error: Lost connection to MySQL server during queryā€¯
Not sure if its a coincidence. My sysadmin has been trying to troubleshoot and asked to check the following:
The issue with lost DB connections needs to be investigated from both sides - our and developers'. Please ask your developers to read my report as well.
First of all, I have to notice that mentioned error occurs not only during the Integrity Check. I've enabled detailed logs for MySQL service and see that it keeps appear intermittently while I'm navigating the admin interface of your website.
So, here is the exact error from MySQL log that we are talking about:
140617 1:32:22 [Warning] Aborted connection 321 to db: 'dev' user: 'dev' host: 'localhost' (Got an error writing communication packets)
numbers of connection ID and timestamps are always different, obviously.
According to the official documentation of MySQL there are several possible reasons of this error. Please take a look at the following page
http://dev.mysql.com/doc/refman/5.5/en/communication-errors.html and please ask your developers to read it as well.
All possible reasons of this issue may be divided into three groups:
1. Configuration limits of MySQL service
Here are the related configuration directives, which may be related to the issue, and their current values after my adjustments. Also with short comments.
connect_timeout = 60 # The number of seconds that the mysqld server waits for a connect packet
max_allowed_packet = 20971520 # The maximum size of one packet or any generated/intermediate string (in bytes)
interactive_timeout = 28800 # The number of seconds the server waits for activity on an interactive connection before closing it
wait_timeout = 28800 # The number of seconds the server waits for activity on a noninteractive connection before closing it
The total amount of errors has been reduced after my changes, so this helped only partially. But the nature and behavior of errors occurrence now makes me think that listed directives are no longer the reason.
2. Lack of resources for MySQL on the server
This also may be a reason of that error, when MySQL is limited in CPU usage or memory for example. But I don't see any warnings about resources lack in the logs and overall system monitoring does not show anything related.
3. Application-related problem
Let me cite the advices from MySQL documentation here. Possible reasons are:
- The client program did not call mysql_close() before exiting;
- The client program ended abruptly in the middle of a data transfer.
We will be waiting for your further comments and developers answer.