How to resolve Morpheus Appliance Backup failing with "mysqldump: Error 2020: Got packet bigger than 'max_allowed_packet' bytes when dumping table"


This post is intended to help you resolve an issue with executing the default Morpheus Appliance backup job. If you are experiencing “mysqldump: Error 2020: Got packet bigger than ‘max_allowed_packet’ bytes” when attempting to execute the Morpheus Appliance backup please continue with this post.

The max_allowed_packet variable is used to configure the maximum packet size that can be received from the MySQL server or client. Both the client and the server have their own max_allowed_packet variable, so in order to handle larger packets, the variable must be increased for both the client and the server.

For all-in-one Morpheus installations the max_allowed_packet can be configured for both the client and the server using an advance morpheus.rb configuration: Additional Configuration Options — Morpheus Docs documentation. Typically you will not need to change this as the default should already be sufficient.

If you have an external database in your Morpheus appliance configuration then you will also need to ensure the max_allowed_packet is set for the mysql server config. Please see the following link for more information:

For all Morpheus installation types, the Morpheus Appliance backup job will use the mysqldump utility configured on the Morpheus app nodes during Morpheus installation. The mysqldump utility is a client, and will also need to have the max_allowed_packet variable configured. By default mysqldump will look for configuration in /etc/my.cnf on the Morpheus application node(s).
If you are hitting the “mysqldump: Error 2020: Got packet bigger than ‘max_allowed_packet’ bytes” error then you should ensure that you have /etc/my.cnf configured on all Morpheus application nodes with a sufficient setting for max_allowed_packet. For example:


You may need to increase 128M depending on your use-case.

I hope this helps.



1 Like