Instructions for increasing Open File Limit

KWH

Member
Jul 18, 2017
9
0
1
UK
cPanel Access Level
Root Administrator
Hi, I have an increasingly busy website which is more and more frequently experiencing problems with MySQL hitting the Open File Limit. The error report emailed to me says the limit is 10000 - it clearly needs to be much, much higher than this as the database is affected about every 2-4 hours now! I've checked Tweak Settings and it is set to "allow cPanel & WHM to determine the best value for your MySQL open_files_limit configuration". I've searched for instructions on how to manually set the Open File Limit and am getting nowhere fast. Is there a link I can refer to for instructions on how to resolve this issue, or can someone kindly bullet point the process for me, please?

Many thanks in advance.

Kelly
 
Last edited by a moderator:

KWH

Member
Jul 18, 2017
9
0
1
UK
cPanel Access Level
Root Administrator
Thanks for your reply. This presents a bit of an experimental process, doesn't it? The thread is 15 years old and the OP had a good deal of problems reaching a solution! I can do without my server being down for hours while I fumble around working out what to do next, with a MUCH newer version of everything to work with! I assume it goes something like this:
  1. Stop the server
  2. Change Tweak Settings> SQL > "allow cPanel & WHM to determine the best value for your MySQL open_files_limit configuration" to disallow.
  3. Modify the /etc/my.cnf file with the new value
  4. Restart the server
Any advice would be gratefully received! My server is crashing every few hours now!
 

KWH

Member
Jul 18, 2017
9
0
1
UK
cPanel Access Level
Root Administrator
I've been able to increase the Open File limit via the route detailed here... So far so good.

cpanelplesk.com/how-to-increase-max-open-file-limit-in-linux-system/