Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

mariadb max_open_files

any experts in mysql here with centos?

for the life of me i cannot increase the number of max open files for mariadb/mqsql past 1024. i am running centos 7.1 liberty release of openstack deployed via packstack/rdo.

during boot, mariadb complains: 160426 5:43:58 [Warning] Could not increase number of max_open_files to more than 1024 (request: 10811)

as the number of db connections increases past 1024 in my openstack cloud i get this in log files and openstack services start failing...

[ERROR] Error in accept: Too many open files

in /etc/my.conf:

[mysqld]

open_files_limit = 10000

max_connections = 10000

[mysqld_safe]

open_files_limit = 10000

max_connections = 10000

in /etc/security/limits.conf (that's an asterisk not a bullet point)

  • hard nofile 65536

  • soft nofile 16384

  • soft nproc 10240

  • hard nproc 10240

in /etc/systemd/system/mariadb.service.d/limits.conf

[Service]

LimitNOFILE=30000 LimitNPROC=65535 max_connections=10000 open_files_limit=10000 LimitMEMLOCK=infinity

in /usr/lib/systemd/system/mariadb.service

[Service]

LimitNOFILE=10000

LimitMEMLOCK=infinity

max_connections=10000

LimitNPROC=65535

also:

su mysql --shell /bin/bash --command "ulimit -n"

10000

any ideas appreciated to increase num of open file.

gracias