MySQL server out of resources

Posted on 15-02-2017 by Nadir Latif


Source: https://support.plesk.com/hc/en-us/articles/213945545-Cannot-login-to-Plesk-SQLSTATE-HY000-General-error-23-Out-of-resources

If you get following error on your MySQL/MariaDB server: General error: 23 Out of resources, then a possible solution is to increase the open_file_limit mysql variable. On Centos 7, this can be done by first creating the folder: /etc/systemd/system/mariadb.service.d/, the create a new file limits.conf with the following contents:

[Service]
LimitNOFILE=20000
After that restart the MySQL/MariaDB service with the command:
systemctl daemon-reload
systemctl restart mariadb.service