Packet too large errors when accessing code reviews
When trying to view or edit code reviews the following error is given:
The following can be found in the logs:
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.
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).
- 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.