Mysql 5.6, CentOS 7 And Errno: 24 – Too Many Open Files
Hi,
may be somewon has a working solution and information on that:
I installed the most recent mysql community on a server and do get a lot of “errno: 24 – Too many open files”.
There are suggestions to increase the open_files_limit, change/add that to /etc/security/limits.conf and modify the systemd script by hand.
Depending on how you start mysql (restart, or at systemboot time …)
the limit get set or not.
Question: Is that may be a known bug or something?
And thats mit a question regarding mariadb or mysql.
Regards . Götz
8 thoughts on - Mysql 5.6, CentOS 7 And Errno: 24 – Too Many Open Files
Hi,
can you do “lsof|grep mysql” and show us the output?
Regards,
Gotz,
This is due to systemd, it overrules your settings. Add a file to systemd config fixes it:
[root@mysql2 ~]# cat /etc/systemd/system/mariadb.service.d/limits.conf
[Service]
LimitNOFILE=10000
LimitMEMLOCK=10000
—
Met vriendelijke groeten / With kind regards, Johan Kooijman
Hi Johan,
Does systemd also overrule /etc/my.conf?
Thx!
Carl
Carl,
By default my.cnf has to obey the OS limits, so in this case the order is:
systemd > /etc/security/limits* > /etc/my*.
—
Met vriendelijke groeten / With kind regards, Johan Kooijman
Thank you for clarifying this, Johan. Very much appreciated!
+1 Thanks! That was a little bit confusing at first.
Regards . Götz
Am 30.04.15 um 04:21 schrieb carlh04426@gmail.com:
<...>
we can set ulimt to limit the number of open files
Hi,
as that example is for maria db, teh oracle mysql rpm dose not ship with something like
/etc/systemd/system/mysqld.service.d
Can I just create /etc/systemd/system/mysqld.service.d/limits.conf and than I’m ready to go?
Thanks for your patience and regards . Götz
Am 29.04.15 um 14:58 schrieb Johan Kooijman: