2

Because I'm getting errno=24 on a few queries in my testing environment (Fedora 18 running mysql-server.x86_64 5.5.31-1.fc18), I'm trying to increase the open files limit for mysqld.

I have already changed the OS limits in /etc/security/limits.conf, and switching to the mysql user I can test with ulimit -a that they did take effect.

I have also added the following to /etc/my.cnf

[mysqld]
#...
open_files_limit = 10000

and restarted the service (and even the physical machine) multiple times, but checking the variables while the server's running, open_files_limit is always 1024. I tried open-files-limit as well, since some of the examples I found online conflicted or were ambiguous, but with the same result.

Thinking maybe the file wasn't being read, I tried adding another variable, and sure enough, if I add and change other variables, they are updated in the runtime variable values, but never the open_files_limit.

So my next thought was that maybe the my.cnf file is being superseded by another one somewhere else on the system, but

[root@host /]# find . -name "*y.cnf"
./etc/my.cnf

So I don't think there are any other cnf files (plus, the locations listed at the dev site don't have it).

I'm at a loss- what could be causing mysql not to accept the value for open_file_limit?

kaz
  • 141
  • 3

1 Answers1

2
cat /usr/lib/systemd/system/mysqld.service
# For example, if you want to increase mysql's open-files-limit to 10000,
# you need to increase systemd's LimitNOFILE setting, so create a file named
# "/etc/systemd/system/mysqld.service.d/limits.conf" containing:
#       [Service]
#       LimitNOFILE=10000
hroost
  • 21
  • 2