Ubuntu – How to increase thesql back_log

amazon ec2MySQLUbuntu

I have programs using mysql heavily, and a large amount of slow queries and an even larger number of fast ones, all happening simultaneously.
I want to increase the back_log variable using :
SET back_log = 1000 but MYSQL says : read-only variable.
I have tried adding to my.cnf : back_log=1000
but it hasn't changed the value after a restart. What is the right procedure?

I'm on an EC2 Ubuntu instance, if that matters

Best Answer

The OS limits the number of open files / connections a user can have. May be 1000 is too much. First, try to put a lower limit into my.cnf, e.g. 400, to see if it is correctly adjusted. If it works, edit /etc/security/limits.conf and set "nofiles" for the mysqld user to a higher value and restart mysqld.

Related Topic