LimitNOFILE reset on every update

Hello Guys,

We are running Percona 5.7 on Centos 7. I found a bug that LimitNOFILE in mysqld.service that reset to 5000 everytime we update Percona. It makes to the max_connections can’t go over 5000 and make the server in serious trouble before we update update that value and restart MySQL.

Is there anyway to avoid this issue and it would be great if Percona take a look on this issue

Thanks for your time!

2 Likes

Hi @D_ng_Ti_n_Dung , thank you for posting to the Percona Forums!

We intentionally set thresholds to reasonable levels, however in your case you need to extend the LimitNOFILE greater than the Percona defaults. The recommended method to do so is to configure with systemctl edit and then restart mysqld. What this process does is create an override file for the mysqld.service, because you don’t want to be changing any of the files under /usr/lib/systemd/system.

These are the steps to follow:

systemctl edit mysqld.service

Then add in the following (set your limit as you believe you need for your environment):

[Service]
LimitNOFILE=10000

Save and exit the editor. Then restart mysqld:

systemctl restart mysqld.service

and your new limit should be in place.

1 Like

Thanks Michael for your advise,
Yes, I have to change mysqld.service on every updates. But it would be great if Percona keep the current configuration when it exist or remove this not necessary configuration from mysqld.service to just use my.cnf for all mysql’s settings.

Cheers,

1 Like

So to be clear @D_ng_Ti_n_Dung - you are already using the override method systemctl edit mysqld.service and this is being changed on upgrade?

1 Like