MySQL shows the error: Too many open files




  • Avatar
    Marcio Nunes

    Dont Work! Ubuntu 16

  • Avatar
    Ivan Postnikov

    @Marcio Nunes

    Please, could you share the details of the issue?
    Did you have trouble with particular step?
    For deeper investigation, I can suggest contacting Plesk Technical Support.

  • Avatar
    Arvind Kumar Madhukar

    Dear Respective !

    I'm very glad to say that, the steps you have shared us with on the URL > is perfect.
    But same steps, if i follow on CloudLinux OS it is not giving any error not we are able to see the changes regarding the open_files_limit, it would be very thankful if you could work on this and let us know the way to get resolve this issue.

  • Avatar
    Ivan Postnikov

    Hello @Arvind,

    This issue will be investigated in the scope of a ticket.

  • Avatar

    Hello Team !

    @Plesk Suport Reply as below.

    I have noticed that the MySQL service changes were not loaded by systemd and therefore not applied:

    # systemctl status mariadb >/dev/null
    Warning: mysqld.service changed on disk. Run 'systemctl daemon-reload' to reload units.

    They were also not synced when the systemctl daemon-reload command was executed. Most likely it is due to the fact that the MariaDB service is a symlink to the MySQL:

    # ls -la /usr/lib/systemd/system/mariadb.service
    lrwxrwxrwx 1 root root 38 Sep 16 01:02 /usr/lib/systemd/system/mariadb.service -> /usr/lib/systemd/system/mysqld.service

    Therefore, I have moved the /usr/lib/systemd/system/mariadb.service.d and /etc/systemd/system/mariadb.service.d directories to /root and created an override using systemctl edit mysql.service command.

    After the override was created, limits were applied and after the MySQL server was restarted, proper limits were active:

    # plesk db "SHOW GLOBAL VARIABLES LIKE 'open_files_limit' \G"
    *************************** 1. row ***************************
    Variable_name: open_files_limit
            Value: 8192
  • Avatar

    Our issue was resolved.

  • Avatar
    Ivan Postnikov

    Hello @Arvind,

    Glad to hear that now it is resolved.

    The resolution may be useful for other Pleskians.

Please sign in to leave a comment.

Have more questions? Submit a request