• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 909
  • Last Modified:

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?
0
David Smithstein
Asked:
David Smithstein
  • 2
1 Solution
 
johanntagleCommented:
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.

0
 
johanntagleCommented:
In case you have documents > 1G, you will need to split them up.  See the links at http://www.experts-exchange.com/Database/MySQL/Q_27384720.html
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now