Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 the open_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?

share|improve this question
up vote 2 down vote accepted

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]...

share|improve this answer
Seems that mysqld_safe is not needed anymore in Ubuntu, probably due to upstart introduction. – Giovanni Toraldo Dec 18 '11 at 13:59
Accept your answer so the question stops showing up as unanswered pls. – xofer Dec 18 '11 at 19:52

Your Answer


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.