MySQL max_allowed_packets

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

MySQL max_allowed_packets

Post by kklosson »

When the AwareIM control panel starts, as near as I can tell it sets the max_allowed_packets variable for MySQL to 16K. My application has some reports that require this setting to be much higher. So if I restart the control panel, I have to reset this variable on the MySQL server. It would be nice if I didn't have to do this.

Support, is there any way you can give as a setting somewhere to set that when the control panel starts - like in the settings or something?
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
Rennur
Posts: 1191
Joined: Thu Mar 01, 2012 5:13 am
Location: Sydney, Australia

Re: MySQL max_allowed_packets

Post by Rennur »

# SERVER SECTION
# ----------------------------------------------------------------------
#
# The following options will be read by the MySQL Server. Make sure that
# you have installed the server correctly (see above) so it reads this
# file.
#
[mysqld]

max_allowed_packet=500M
I have set mine to
max_allowed_packet=500M


C:\Program Files\MySQL\MySQL Server 5.x\my.ini
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: MySQL max_allowed_packets

Post by kklosson »

I have set this value in the file my-default.ini in the root folder:

# Set Max Allwed Packet
max_allowed_packet=128M

It never takes.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
Rennur
Posts: 1191
Joined: Thu Mar 01, 2012 5:13 am
Location: Sydney, Australia

Re: MySQL max_allowed_packets

Post by Rennur »

Change in the my.ini file under [mysqld].
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: MySQL max_allowed_packets

Post by kklosson »

Thanks. I don't know what you mean by "under [mysqld]. There is no "my.ini" file in the directory tree.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: MySQL max_allowed_packets

Post by kklosson »

So why does this variable change whenever I restart the control panel?
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: MySQL max_allowed_packets

Post by kklosson »

So can anyone answer the above question?
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
hpl123
Posts: 2604
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: MySQL max_allowed_packets

Post by hpl123 »

Kklosson,
I can´t answer your question about AIM resetting your MySQL packet setting at startup but I think setting this setting in the MySQL config file will work. I myself have other settings there related to AIM that isn´t affected when starting up, restarting etc. the server.

Regarding the config file, this differs a bit on different versions of MySQL, see this post for info:
http://stackoverflow.com/questions/4292 ... in-windows
Henrik (V8 Developer Ed. - Windows)
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: MySQL max_allowed_packets

Post by kklosson »

Thanks but this setting is only applied with the service is started. Anytime I restart the control panel this setting goes back to 16K. The control panel startup must be doing something...
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
ACDC
Posts: 1143
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: MySQL max_allowed_packets

Post by ACDC »

It seems odd that Aware is enforcing this setting on a reload. This could be a problem, I wonder why they are doing it, maybe support can advise us on this. In the meantime if you have this setting in your my.ini file, if you stop and start the Mysql Service you can update the setting... but then you have to do this on every reset of the aware server
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: MySQL max_allowed_packets

Post by kklosson »

It's easy enough to reset the variable, I just see no reason for AwareIM to push a value to it. It goes to my original post... Either give us a setting to push or leave it alone. I would like Support to confirm whether this is actually an issue they can fiddle with.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
Rennur
Posts: 1191
Joined: Thu Mar 01, 2012 5:13 am
Location: Sydney, Australia

Re: MySQL max_allowed_packets

Post by Rennur »

So why does this variable change whenever I restart the control panel?

It seems that the AIM server always resets the value to 16mb. Mine is set to 1GB and I have checked the settings using MySQL tools to confirm this.

I'm now getting an error saying

Code: Select all

Message is Unable to persist process context Packet for query is too large (31721605 > 16776192). You can change this value on the server by setting the max_allowed_packet' variable. Sending failure reply 


Everyone should check the Server output on startup to see if AIM sets the value as 16mb.
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: MySQL max_allowed_packets

Post by aware_support »

The problem should be fixed in build 2027
Aware IM Support Team
hpl123
Posts: 2604
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: MySQL max_allowed_packets

Post by hpl123 »

Great this is fixed.
You guys that know, what should we ideally set this to for our apps? and also is it dependant on app type i.e. app with big reports use more, apps with no reports use default etc. etc.?

Thanks
Henrik (V8 Developer Ed. - Windows)
kklosson
Posts: 1628
Joined: Sun Nov 23, 2008 3:19 pm
Location: Virginia

Re: MySQL max_allowed_packets

Post by kklosson »

You will know when you need it because your user will get an error pointing right to it. I am currently using 128000000. I get the error when generating a very complex report.
V8.8
MySQL, AWS EC2, S3
PDFtk Toolkit
Post Reply