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 do I import an SQL file using the command line in MySQL?
Viewed 853 times since Wed, Sep 2, 2020
"End of script output before headers" in Apache + PHP
Viewed 963 times since Sun, Feb 27, 2022
mysqldump exports only one table
Viewed 793 times since Wed, Sep 2, 2020
MySQL-PHP get and echo NOW() value?
Viewed 709 times since Mon, Sep 28, 2020
Incorrect string value: ’\xF0\x9F\x8E\xB6\xF0\x9F...’ MySQL
Viewed 831 times since Thu, Feb 3, 2022
How can I disable MySQL Strict Mode?
Viewed 881 times since Mon, Sep 28, 2020
Server error: Connection reset by peer | End of script output before headers
Viewed 3385 times since Mon, Feb 28, 2022
How do I disable Strict Mode in MySQL?
Viewed 763 times since Mon, Sep 28, 2020