[ERROR] Error in accept: Too many open files 1


With some versions of MariaDB, the server could stop responding to sql queries.

service mysql status shows

mysql[413]: ERROR 23 (HY000) at line 1: Out of resources when opening file ‘./…’ (Errcode: 24 “Too many open files”)
[ERROR] Error in accept: Too many open files

To adjust the limits of MariaDB / MySQL under Debian Jessie add the following entries to /etc/security/limits.conf

mysql soft nofile 65535
mysql hard nofile 65535

mkdir -p /etc/systemd/system/mysql.service.d/
vi /etc/systemd/system/mysql.service.d/limits.conf

[Service]
LimitNOFILE=infinity

systemctl daemon-reload
service mysql restart

Check the new limits:
cat /proc/$(cat /var/run/mysqld/mysqld.pid)/limits


Leave a comment

Your email address will not be published. Required fields are marked *

One thought on “[ERROR] Error in accept: Too many open files