On Wed, 2003-03-05 at 15:16, Johannes Ullrich wrote: > > on mysql 4.0.10-gamma (rpm install, Redhat advanced server), I > am running into 'too many open files' issues ( error 24 ). > > I am using a rather large merge table (30 distinct tables merged), > which is likely the culprit. The error shows up as I have about a > dozen of connections. > > I did increase the number of file handles substantionally (16384) > and it looks like this limit is not reached: > > cat /proc/sys/fs/file-nr > 5328 4758 16384 > > This is a 2.4 kernel, so inodes are allocated automatically and > there is no inode-max setting. > > 'open_files_limit' is set to 0. > 'table_cache' is set to 1024 > Hi,
You should check your soft limit: ulimit -aS This might be significantly lower than the hard limit for your system, and will be the value inherited my mysql when it starts up. MySQL uses max_connections and table_cache_size to figure out what its max requirement will be. If this requirement is higher than the soft limit, MySQL raises the soft limit using setrlimit() The code that sets the limit is in sql/mysqld.cc: uint wanted_files=10+(uint) max(max_connections*5, max_connections+table_cache_size*2); set_if_bigger(wanted_files, open_files_limit); On my debian box woody box, the soft limit defaults to 1024. If your system is similar, then mysql might raise the limit to 2048+max_connections. Be aware that if you join your merge table to another merge table (or itself), the number of file descriptors used can grow rapidly. A quick spot check can be performed by running 'ls /proc/<mysql-thread>/fd | wc -l' == Martin --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php