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
How to export a mysql database using Command Prompt?
Viewed 791 times since Wed, Sep 2, 2020
LEFT JOIN vs. LEFT OUTER JOIN in SQL Server
Viewed 994 times since Wed, Sep 2, 2020
UTF8 DB Text Fix
Viewed 3259 times since Sat, Sep 5, 2020
Host ’xxx.xx.xxx.xxx’ is not allowed to connect to this MySQL server
Viewed 707 times since Thu, Feb 4, 2021
MySQL-PHP get and echo NOW() value?
Viewed 652 times since Mon, Sep 28, 2020
Export and Import all MySQL databases at one time
Viewed 652 times since Fri, Mar 18, 2022
How do I disable Strict Mode in MySQL?
Viewed 692 times since Mon, Sep 28, 2020
mysqldump exports only one table
Viewed 718 times since Wed, Sep 2, 2020