Too many open files error on Ubuntu 8.04 Too many open files error on Ubuntu 8.04 linux linux

Too many open files error on Ubuntu 8.04


At first, to identify the certain user or group limits you have to do the following:

root@ubuntu:~# sudo -u mysql bashmysql@ubuntu:~$ ulimit -acore file size          (blocks, -c) 0data seg size           (kbytes, -d) unlimitedscheduling priority             (-e) 0file size               (blocks, -f) unlimitedpending signals                 (-i) 71680max locked memory       (kbytes, -l) 32max memory size         (kbytes, -m) unlimitedopen files                      (-n) 1024pipe size            (512 bytes, -p) 8POSIX message queues     (bytes, -q) 819200real-time priority              (-r) 0stack size              (kbytes, -s) 8192cpu time               (seconds, -t) unlimitedmax user processes              (-u) 71680virtual memory          (kbytes, -v) unlimitedfile locks                      (-x) unlimitedmysql@ubuntu:~$

The important line is:

open files (-n) 1024

As you can see, your operating system vendor ships this version with the basic Linux configuration - 1024 files per process.

This is obviously not enough for a busy MySQL installation.

Now, to fix this you have to modify the following file:

/etc/security/limits.conf

mysql             soft    nofile           24000mysql             hard    nofile           32000

Some flavors of Linux also require additional configuration to get this to stick to daemon processes versus login sessions. In Ubuntu 10.04, for example, you need to also set the pam session limits by adding the following line to /etc/pam.d/common-session:

session required pam_limits.so


Quite an old question but here are my two cents.

The thing that you could be experiencing is that the mysql engine didn't set its variable "open-files-limit" right.

You can see how many files are you allowing mysql to openmysql> SHOW VARIABLES;

Probably is set to 1024 even if you already set the limits to higher values.

You can use the option --open-files-limit=XXXXX in the command line for mysqld.

Cheers


add --single_transaction to your mysqldump command