Link to home
Start Free TrialLog in
Avatar of David Smithstein
David SmithsteinFlag for United States of America

asked on

Determining Max_Allowed_Packet setting for MySQL

I'm trying to mitigate a potential risk where my hosting server reboots, and the MySQL service is restarted and the default Max_Allowed_Packet setting is not increased to allow my software to handle large enough documents.

Without changing this setting, the application fails to load new documents, or correctly create the historical copy when a new revision is released.

I tried putting the command line in the My.ini file of max_allowed_packet = 10485760000;  and rebooting the server, but the MySQL service didn't restart automatically so I had to start it using the MySQL Configuration Tool that rewrites the my.ini file.

I can manually change the setting by entering SET GLOBAL max_allowed_packet = 10485760000; at the mysql command prompt through Navicat (MySQL editing tool), and then everything works as it should.

I either need to figure out how to make sure this setting is applied at the virtual server in case the data center has to recreate my server instance, or access this setting through VBA in my application and write in some code that checks for the proper setting before allowing the user to release a document.

I tried to hunt for that setting in the registry, but I don't think MySQL stores that setting there.

Anyone have any ideas how I should handle this?
Avatar of johanntagle
johanntagle
Flag of Philippines image

When you set the variable via mysql client or navicat, did you verify it via SHOW VARIABLES?  http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_max_allowed_packet states that 1073741824 or 1GB is the highest possible value for it.  Chances are it got set to 1GB only.  Try using that number in your my.ini.

ASKER CERTIFIED SOLUTION
Avatar of johanntagle
johanntagle
Flag of Philippines image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial