Mysql/Maria DB – Too many open files

Solution how to fix following error generated in /var/log/syslog by mysqld service on Ubuntu 16.04 with MariaDB 10.0.x:

If you see message above you probably reached default limits of mysqld service. To set open files parameter limit as unlimited, follow steps below:

  • Login as root:
  • Modify /etc/security/limits.conf:
  • And set mysql soft and hard limit for nofiles:
  • Save modified limits.conf and Reboot system:
  • Create mysql.service.d folder to customize startup parameters and create limits.conf file:
  • Into limits.conf insert following:
  • Save file and restart mysqld service:
  • Check new limits of mysqld process:
  • Desired state after change:
  • By default mariadb has following:


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.