Re: MAX_ALLOWED_PACKETS IN UBUNTU MYSQL 5.7

From: Axel Schwenke <axel.schwenke_at_gmx.de>
Date: Wed, 10 Jan 2018 11:56:58 +0100
Message-ID: <p34rhr$6es$1_at_dont-email.me>


On 10.01.2018 05:38, Suresh Kumar wrote:
> We are facing the Max_Allowed_Packets Issue in which the value is frequently getting changed to 1024 from 1073741824

That makes no sense. Who or what should change that? The default is 4M. Any other value can be set in my.cnf. And of course each database session can change it locally (with a SET statement).

Now what exactly is it that you see?

I would like to add that it is a rather bad idea to set this variable to the maximum of 100M (as you intend). Because each worker thread in the MySQL server might use twice that for network buffers (incoming and outgoing). If you have max_connections=100, this could result in up to 100*2*100M = 20G of memory used for network buffers alone.

The default of 4M should be good enough for any practical use case. If some application needs more, it can still increase the limit dynamically. Received on Wed Jan 10 2018 - 11:56:58 CET

Original text of this message