Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

max_open_files cannot be changed

Discussion in 'Database Discussion' started by masterross, Jan 27, 2019.

  1. masterross

    masterross Well-Known Member

    Joined:
    Apr 7, 2004
    Messages:
    46
    Likes Received:
    3
    Trophy Points:
    158
    Hi,

    It looks like mysql (10.1.37-MariaDB, WHM v76.0.18) doesnt accept max_open_files set in my.cnf
    I have:
    table_open_cache = 8000

    but after restart when I check var:

    MariaDB [(none)]> show global variables like 'table_open_cache';

    +------------------+-------+
    | Variable_name | Value |
    +------------------+-------+
    | table_open_cache | 5325 |
    +------------------+-------+
    1 row in set (0.01 sec)

    Also open_files_limit cannot be changed too!
    I have set Allow cPanel & WHM to determine the best value for your MySQL open_files_limit configuration? to NO
    But this not helping.

    Any solution?

    EDIT:
    I found that if I need to change:
    /etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf
    LimitNOFILE

    and then
    # systemctl daemon-reload
    # systemctl restart mysql

    i set LimitNOFILE=16000
    And the table_open_cache also changed itself to 7825 automatically.

    It's strange but it do the job.
     
    #1 masterross, Jan 27, 2019
    Last edited: Jan 27, 2019
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,164
    Likes Received:
    475
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @masterross

    This is a setting that changed in CentOS 7 with systemd. I'm glad you found the solution and were able to implement it!

    Thank you for letting us know how you resolved it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice