GNU Info

Info Node: (mysql.info)Not enough file handles

(mysql.info)Not enough file handles


Prev: Cannot initialize character set Up: Common errors
Enter node , (file) or (file)node

File Not Found
--------------

If you get `ERROR '...' not found (errno: 23)', `Can't open file: ...
(errno: 24)', or any other error with `errno 23' or `errno 24' from
MySQL, it means that you haven't allocated enough file descriptors for
MySQL.  You can use the `perror' utility to get a description of what
the error number means:

     shell> perror 23
     File table overflow
     shell> perror 24
     Too many open files
     shell> perror 11
     Resource temporarily unavailable

The problem here is that `mysqld' is trying to keep open too many files
simultaneously.  You can either tell `mysqld' not to open so many files
at once or increase the number of file descriptors available to
`mysqld'.

To tell `mysqld' to keep open fewer files at a time, you can make the
table cache smaller by using the `-O table_cache=32' option to
`safe_mysqld' (the default value is 64). Reducing the value of
`max_connections' will also reduce the number of open files (the
default value is 90).

To change the number of file descriptors available to `mysqld', you can
use the option `--open-files-limit=#' to `safe_mysqld' or `-O
open-files-limit=#' to `mysqld'. Note: SHOW VARIABLES.  The easiest
way to do that is to add the option to your option file.  Note: Option
files.  If you have an old `mysqld' version that doesn't support
this, you can edit the `safe_mysqld' script.  There is a commented-out
line `ulimit -n 256' in the script.  You can remove the `'#'' character
to uncomment this line, and change the number 256 to affect the number
of file descriptors available to `mysqld'.

`ulimit' (and `open-files-limit') can increase the number of file
descriptors, but only up to the limit imposed by the operating system.
There is also a 'hard' limit that can only be overrided if you start
`safe_mysqld' or `mysqld' as root (Just remember that you need to also
use the `--user=..' option in this case).  If you need to increase the
OS limit on the number of file descriptors available to each process,
consult the documentation for your operating system.

Note that if you run the `tcsh' shell, `ulimit' will not work!  `tcsh'
will also report incorrect values when you ask for the current limits!
In this case you should start `safe_mysqld' with `sh'!


automatically generated by info2www version 1.2.2.9