Ask Your Question
0

mariadb max_open_files

asked 2016-04-26 01:26:41 -0500

jeff gravatar image

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

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-05-02 10:05:52 -0500

this limit should be related to selinux policy, as a customer we've opened a bug to rh:

https://bugzilla.redhat.com/show_bug.cgi?id=1323673 (https://bugzilla.redhat.com/show_bug....)

but as work around you could use a custom selinux module -> have a look to comment 6 to create a new one.

edit flag offensive delete link more

Comments

thanks for the reply ...that was it :)

jeff gravatar imagejeff ( 2016-05-02 18:15:00 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-04-26 01:26:41 -0500

Seen: 1,079 times

Last updated: Apr 26 '16