MySQL out of resources on Fedora 20+
If you got this error:
when opening file '/var/tmp/#sql....MAI' (Errcode: 24)
Here is the fix:
In my experience with Fedora 20+, you don’t need to set ulimit
, nor /etc/security/limits.conf
, nor /etc/my.cnf
.
Just set it in systemd.
mkdir /etc/systemd/system/mariadb.service.d/
vim /etc/systemd/system/mariadb.service.d/limits.conf
and add:
[Service]
LimitNOFILE=10000
Run command:
systemctl daemon-reload
systemctl restart mariadb
Verify the value with SQL:
SHOW VARIABLES LIKE 'open%';
This fix is found from /usr/lib/systemd/system/mariadb.service
.