Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

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

I am facing this issue:


  • I know I need to increase open_files_limit, but to how much?
  • Can I call a command in mysql that tells me how much this should be?
share|improve this question
up vote 4 down vote accepted

You may find this surprising, but mysqld actually determines the correct value for you upon startup.

The MySQL Documentation says the default value for open_files_limit is 0. Yet, when you run the command SHOW VARIABLES LIKE 'open_files_limit';, it does not come back with 0. It returns what mysqld would comfortably run with.

The MySQL Documentation says the maximum value for open_files_limit is 65535. I have seen some systems with the setting above 100000 upon startup (132332 to be exact). That being the case, there are some instances where you cannot set open_files_limit any higher.

Just run the command I mentioned

SHOW VARIABLES LIKE 'open_files_limit';

If the number comes back less that 65535, you can experiment with higher values up to 65535.

Keep in mind two more things

share|improve this answer

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.