Home » Categories » Multiple Categories

MySQL/MariaDB error on the server with Plesk: Could not increase number of max_open_files to more than 16384

Applicable to:

  • Plesk for Linux

Symptoms

  • The following error can be seen when checking MySQL/MariaDB status via the 

    systemctl status mariadb

     command:

    [Warning] Could not increase number of max_open_files to more than 16384 (request: 32335).
  • MySQL/MariaDB performance is very slow.

Cause

Hard limit of the process exceeded the number set for open files limit (16384) in database server configuration files:

#Number of files limit
LimitNOFILE=16384

Resolution

  1. Connect to the server via SSH

  2. Find in which exact file the limit is set by executing the following commands:
    egrep -r LimitNOFILE /etc/systemd/system/m*
    egrep -r LimitNOFILE /lib/systemd/system/m*

    Note: You are looking for a line that does not have a # in its beginning. That line contains the configuration that is active.

  3. Once you find in which file the line 

    LimitNOFILE

     is active, edit that file with your favorite command-line text editor and adjust the value:

    LimitNOFILE=32335
  4. Save the changes and close the file
  5. Reload all daemons on the server:

    systemctl daemon-reload
  6. Restart the  mariadb  or  mysql  service:

    systemctl restart mariadb
Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
 
Attachments Attachments
There are no attachments for this article.
Comments Comments
There are no comments for this article. Be the first to post a comment.
Related Articles RSS Feed
UTF8 DB Text Fix
Viewed 3475 times since Sat, Sep 5, 2020
mysqldump exports only one table
Viewed 841 times since Wed, Sep 2, 2020
Incorrect string value: ’\xF0\x9F\x8E\xB6\xF0\x9F...’ MySQL
Viewed 885 times since Thu, Feb 3, 2022
How to change the MySQL root account password on CentOS7?
Viewed 1057 times since Thu, Feb 4, 2021
Your Password does not satisfy the Current Policy Requirements
Viewed 719 times since Sat, Sep 19, 2020
Optimizing query for large number of rows in mysql
Viewed 786 times since Wed, Sep 9, 2020
"End of script output before headers" in Apache + PHP
Viewed 1035 times since Sun, Feb 27, 2022
How to export a mysql database using Command Prompt?
Viewed 914 times since Wed, Sep 2, 2020
Export and Import all MySQL databases at one time
Viewed 829 times since Fri, Mar 18, 2022