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:

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
Shutdown Fisheye/ Crucible
Shutdown MySQL
Edit the my.cnf file (or my.ini in Windows)
Update the max_allowed_packet value to 64MB
Now update the innodb_log_file_size value to 256M
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).
These will be called ib_logfile* and are usually located in /var/lib/mysql on Linux
If you're not sure where they are located, run lsof -c mysqld | grep ib_logfile with MySQL running to find them.
Start MySQL.
Start Fisheye/ Crucible.
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.
Was this helpful?