MySql: Communications link failure

MySql: Communication link failure

   KB 22720        Last updated on 2016-06-9  




0.00
(0 votes)

Problem


A full backup for a single account stops with the following exception:

2016-05-11 13:58:25,603 WARN [FullBackupThread] [name=admin@example.com;mid=2;] backup - Error occurred during full backup for account admin@example.com; aborted backup  and deleting /backup/tmp/full-20160511.115806.637/accounts/991/e7e/991e7e61-8ec0-4216-ac39-13407491ac83 
com.zimbra.common.service.ServiceException: system failure: backing up table: mboxgroup2.mail_item 
ExceptionId:BackupSetWorkerThread-DB:1462967905595:a573750a2018f5f0 
Code:service.FAILURE 
at com.zimbra.common.service.ServiceException.FAILURE(ServiceException.java:260) 
at com.zimbra.cs.db.DbBackup.saveTable(DbBackup.java:128) 
at com.zimbra.cs.backup.BackupAccountSession.storeTablesToLocalFile(BackupAccountSession.java:317) 
at com.zimbra.cs.backup.FileBackupTarget$BackupAcctSession.storeTablesStage(FileBackupTarget.java:1639) 
at com.zimbra.cs.backup.FileBackupTarget$BackupSetWorkerThread.run(FileBackupTarget.java:2993) 
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Communications link failure
The last packet successfully received from the server was 400 milliseconds ago. The last packet sent successfully to the server was 400 milliseconds ago.

Resolution


1. If the account is big and the backup takes too long, MySql will timeout. To solve the problem run the following command:

zmlocalconfig -e backup_disable_blob_digest_preloading=true 


2. A second fix is to increase the timeout value in my.cnf file:

  • Edit /opt/zimbra/conf/my.cnf file and put under the [mysqld] section:
wait_timeout = 28800 

Save & exit.

zmcontrol restart 


Additional Information


The problem occurs because the backup thread looses its connection to the DB if the blob stage has a long time to complete, which causes the backup to fail.

Verified Against: Zimbra Collaboration 8.6, 8.5, 8.0 Date Created: 06/07/2016
Article ID: https://wiki.zimbra.com/index.php?title=MySql:_Communications_link_failure Date Modified: 2016-06-09



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »


Wiki/KB reviewed by SME1 SME2 COPY EDITOR Last edit by Teodor Vizirov
Jump to: navigation, search