Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fix MySQL "[ERROR] Error in accept: Too many open files" on start on Debian

Fix MySQL "[ERROR] Error in accept: Too many open files" on start

Check system limtis

cat /proc/$(cat /var/run/mysqld/mysqld.pid)/limits

Update system limits

$ vim /etc/security/limits.conf

mysql soft nofile 65535
mysql hard nofile 65535

$ reboot

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

[Service]
LimitNOFILE=infinity

$ systemctl daemon-reload
$ /etc/init.d/mysql restart

Check system limtis again

cat /proc/$(cat /var/run/mysqld/mysqld.pid)/limits

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment