Packet too large errors when accessing code reviews

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

When trying to view or edit code reviews the following error is given:

(Auto-migrated image: description temporarily unavailable)

The following can be found in the logs:

1 2 2015-06-01 09:54:43,391 ERROR [qtp1167186972-232199 anager.updateDetails] fisheye HibernateUtil-withRetriableTransaction - Unable to execute DefaultContentManager.updateDetails after 10 retries. Giving up Caused by: java.sql.BatchUpdateException: Packet for query is too large (17668091 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable.

Cause

This is caused either by the maximum allowed packet size of the MySQL server being too small, or when the InnoDB log file is too small (sometimes both).

For more information on the max_allowed_packet value or the innodb_log_file_size value please refer to these MySQL knowledge articles.

Resolution

  1. Shutdown Fisheye/ Crucible

  2. Shutdown MySQL

  3. Edit the my.cnf file (or my.ini in Windows)

  4. Update the max_allowed_packet value to 64MB

  5. Now update the innodb_log_file_size value to 256M

  6. Delete the current innodb log files. This is required so that MySQL can resize them on restart (MySQL will fail to start without this step).

    1. These will be called ib_logfile* and are usually located in /var/lib/mysql on Linux

    2. If you're not sure where they are located, run lsof -c mysqld | grep ib_logfile with MySQL running to find them.

  7. Start MySQL.

  8. Start Fisheye/ Crucible.

  9. Check if the issue persists.

    If the error continue to show up into the logs then repeat the above steps increasing both values to 512M instead of 64/128.

Updated on April 15, 2025

Still need help?

The Atlassian Community is here for you.