ALF - When trying to upload 300 pages from the pen the server log file shows an error message 'Got a packet bigger than 'max_allowed_packet' bytes'

Question
After writing on the 300+ pages, the user's pen started buzzing each time he wrote on a new form, the pen icon on the display had a slash on it and it looked to be full. When trying to upload, penUploader app showed an error "json_encode ():. The server log file shows a error message 'Got a packet bigger than 'max_allowed_packet' bytes'. Invalid UTF-8 sequence in argument". The server log file shows an error message 'Got a packet bigger than 'max_allowed_packet' bytes'. How can we get the pages back?

Answer
You need to set the max_allowed_packet value in /etc/my.cnf to 16M and restart the MySQL server.

The standard config of MySQL allows up to 1Mb of data to be sent as a query, largely for safety and security of the system, though it can handle a much bigger amount. For each submission, the pen data is stored. If a pen is full, the SQL query will be a little over 4Mb in size, so the max_allowed_packet needs to be increased.

The current release of ALF will check to see what this is set to and advise increasing it if it is less than 16Mb. If this was a standard web server, this is excessive and it's not something we'd advise unless it was an absolute necessity of the software being used. The ALF platform falls outside of this category by the nature of the data being handled. Data is sent to the MySQL server as a transaction, so when the raw pen data is taken into account alongside the interpreted data, this could lead to a large amount of data needing to be sent.

Was this article useful? Thanks for the feedback There was a problem submitting your feedback. Please try again later.