Getting 'Communications link failure' CommunicationsException Error when Making XML Backup
Symptoms
Using MySQL, when making a manual XML backup, the database connection is timing out. The following appears in the atlassian-confluence.log
:
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception
Cause
According to the MySQL manual:
The number of seconds the server waits for activity on a non-interactive connection before closing it. This timeout applies only to TCP/IP and Unix socket file connections, not to connections made via named pipes, or shared memory.
On thread startup, the session wait_timeout value is initialized from the global wait_timeout value or from the global interactive_timeout value, depending on the type of client (as defined by the CLIENT_INTERACTIVE connect option to mysql_real_connect()). See also interactive_timeout.
Resolution
This problem is resolved by adjusting the wait_timeout parameter to a higher value.
If problems persist after making the changes, switch to a different Production Backup Strategy.