Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
What did you put in limits.conf? –  Michael Hampton Jun 10 '13 at 18:30
    
limits.conf has mysql soft nofile 24000 and mysql hard nofile 32000. For the moment, I'm more interested in getting it to take new values than picking optimal ones. –  kaz Jun 10 '13 at 19:14

1 Answer 1

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
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.