MySQL open files limit
Solved it - there are no extra hoops, it's just the mysql config that lied! I had put the open-files-limit
line in the [mysqld_safe]
section, but it seems that section is no longer used. Moving all config options to [mysqld]
...
Related videos on Youtube
Brian
Updated on September 17, 2022Comments
-
Brian over 1 year
This question is similar to set open_files_limit, but there was no good answer.
I need to increase my
table_open_cache
, but first I need to increase theopen_files_limit
. I set the option in/etc/mysql/my.cnf
:open-files-limit = 8192
This worked fine in my previous install (Ubuntu 8.04), but now in Ubuntu 10.04, when I start the server up,
open_files_limit
is reported to be 1710. That seems like a pretty random number for the limit to be clipped to.Anyway, I tried getting around it by adding a line like this in
/etc/security/limits.conf
:mysql hard nofile 8192
I also tried adding this to the pre-start script in mysql's upstart config (
/etc/init/mysql.conf
):ulimit -n 8192
Obviously neither of those things worked. So where is the hoop that has been added between Ubuntu 8.04 and 10.04 through which I must jump in order to actually increase the open files limit?
-
Giovanni Toraldo over 12 yearsSeems that mysqld_safe is not needed anymore in Ubuntu, probably due to upstart introduction.