← Back to team overview

maria-discuss team mailing list archive

New Question: Cannot increase open-files-limit

 

Hello,

A new question has been asked in "Managing MariaDB" by raquel.j. Please answer it at http://mariadb.com/kb/en/cannot-increase-open-files-limit/ as the person asking the question may not be subscribed to the mailing list.

--------------------------------


I have a LEMP stack on Ubuntu 14.04 with 10.0.17-MariaDB-1~trusty.  Mysql is a huge bottleneck for my server. I have tried everything of which I am aware to raise the open files limit for mysql. I have added "open-files-limit = 2097152" to my.cnf. I have added the following to limits.conf:

* soft nofile 2097152
* hard nofile 2097152
* soft nproc 2097152
* hard nproc 2097152
mysql soft nofile 2097152
mysql hard nofile 2097152
mysql soft nproc 2097152
mysql hard nproc 2097152

I have added "session required pam_limits.so" to /etc/pam.d/common-session* and /etc/pam.d/sudo and a couple of others. I have tried restarting mysql after reboot - no change. I also checked /etc/apparmor.d/usr.sbin.mysqld to see if it was involved but the file is empty. After all that I still get the following:

# ulimit -Sa
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 256538
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 2097152
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

When I run # mysqld --verbose I get this:

150501  0:19:35 [Warning] Could not increase number of max_open_files to more than 1024

Does anyone have any idea as to what is blocking this change???

--------------------------------

To view or answer this question please visit: http://mariadb.com/kb/en/cannot-increase-open-files-limit/