Sometimes you might see the following messages in mysql.log file:
[Note] Aborted connection 2339295 to db: '<db>' user: '<user>' host: 'localhost'
(Got an error writing communication packets)
which means that the connection to MySQL is actually aborted, and the site that uses the database is most likely not working. In the majority of cases, we had Joomla or other CMS based websites affected by this issue.
The most probable cause is MySQL's query cache mechanism, so first, check if query cache is enabled:
mysql> show variables like '%query_cache%'; +------------------------------+---------+ | Variable_name | Value | +------------------------------+---------+ | have_query_cache | YES | | query_cache_limit | 1048576 | | query_cache_min_res_unit | 4096 | | query_cache_size | 0 | | query_cache_strip_comments | OFF | | query_cache_type | ON | | query_cache_wlock_invalidate | OFF | +------------------------------+---------+ 7 rows in set (0.00 sec)
Please note that the issue appears only with nd_mysqli PHP extension enabled.
So, if you face the issue with Aborted connection messages (it applies to MySQL 5.7 only), try to disable query_cache first, or use mysqli PHP extension instead of nd_mysqli.
The bug description (for your reference): https://bugs.mysql.com/bug.php?id=84639
Comments
0 comments
Please sign in to leave a comment.