Changing open-files-limit in mysql 5.5

Posted by davidv on Server Fault See other posts from Server Fault or by davidv
Published on 2012-10-22T08:53:06Z Indexed on 2012/10/24 11:04 UTC
Read the original article Hit count: 273

Filed under:
|
|

I'm having an issue with mysql 5.5 running on Ubuntu 12.04 with the open-files-limit parameter.

I recently noticed some problems due to the 1024 limit, and actually the main system limit was set to 1024, so I modified /etc/security/limits.conf with the following:

* soft nofile 32000
* hard nofile 32000
root soft nofile 32000
root hard nofile 32000

After that I check the ulimit value for root and even for mysql user, both returned the new value: 32000, so I assume the change has already been done.

I also changed the value at the my.cnf file, setting open-files-limit to 24000, like this:

open-files-limit    = 24000

Now comes the odd part, when I restart the mysql service and check the open_files_limit variable, it returns that it's still set to 1024, so I'm having the same problems that before (obviously), I tried to use open-files-limit instead open_files_limit in the my.cnf config file, same result, BUT if I override the service command to start the service and start only using mysqld (no additional parameters), the service starts and when I check the parameter it returns 32000... I don't know where it's taking that value from, as it's not set at my.cnf and it's not being given through command line, at least, not for myself.

Any ideas about why it's not working the change and how to solve it the normal way (launching it through service...)?

© Server Fault or respective owner

Related posts about mysql

Related posts about ulimit