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
Your Password does not satisfy the Current Policy Requirements
Viewed 652 times since Sat, Sep 19, 2020
How do I import an SQL file using the command line in MySQL?
Viewed 818 times since Wed, Sep 2, 2020
LEFT JOIN vs. LEFT OUTER JOIN in SQL Server
Viewed 1041 times since Wed, Sep 2, 2020
How to change the MySQL root account password on CentOS7?
Viewed 973 times since Thu, Feb 4, 2021
mysqldump exports only one table
Viewed 762 times since Wed, Sep 2, 2020
How do I disable Strict Mode in MySQL?
Viewed 725 times since Mon, Sep 28, 2020
UTF8 DB Text Fix
Viewed 3311 times since Sat, Sep 5, 2020
Incorrect string value: ’\xF0\x9F\x8E\xB6\xF0\x9F...’ MySQL
Viewed 715 times since Thu, Feb 3, 2022
MySQL-PHP get and echo NOW() value?
Viewed 679 times since Mon, Sep 28, 2020