I did read the archives, and it helped me to find out that restarting mysql fixes it for some time, and i increased the values several times but no luck. It starts working fine for a while but then again it fails . In the end i have this config right now and the problem persists, i can reproduce the problem just by executing
mysqlcheck -m -A -p -- # sysctl kern.maxfiles kern.maxfiles=20000 -- in login.conf: _mysql:\ :openfiles=8192:\ :datasize=infinity:\ :maxproc=infinity:\ :openfiles-cur=8192:\ :openfiles-max=10000:\ :stacksize-cur=8M: in my.cnf: [mysqld] socket = /var/www/logs/mysql/mysql.sock old-passwords tmpdir = /var/mysql/tmp open-files-limit = 10000 sql-mode = MYSQL40 skip-name-resolve table_cache = 1024 query_cache_size = 64M key_buffer = 64M long_query_time = 5 #log-slow-queries #log-queries-not-using-indexes thread_concurrency = 2 #query_cache_limit = 1M interactive_timeout=60 wait_timeout=60 connect_timeout=15 basedir=/usr/local datadir=/var/mysql sort_buffer_size = 1M read_buffer_size = 1M read_rnd_buffer_size = 4M myisam_sort_buffer_size = 64M [mysql.server] old-passwords [mysqld_safe] open-files=8192 ---- Maybe i need to increase something else? Thanks! ----- Original Message ----- From: "Otto Moerbeek" <[EMAIL PROTECTED]> To: "Marcos Laufer" <[EMAIL PROTECTED]> Cc: <misc@openbsd.org> Sent: Friday, July 13, 2007 3:12 AM Subject: Re: mysql problem On Fri, 13 Jul 2007, Marcos Laufer wrote: > I am having a very strange problem on a 3.9 , suddenly i can't access any > table > on the databases. I have around 100 databases on this server and can't access > not even one. This is a production server and i am in an urge to solve it, if > anyone > can help i would appreciate it: > > # mysql mysql -p > Enter password: > Welcome to the MySQL monitor. Commands end with ; or \g. > Your MySQL connection id is 303342 to server version: 5.0.18 > > Type 'help;' or '\h' for help. Type '\c' to clear the buffer. > > mysql> show tables; > ERROR 1018 (HY000): Can't read dir of './mysql/' (errno: 9) > mysql> > > > I have backups of all databases, including mysql database which i think is the > one > broken , how can i restore it ? > > Thanks for your help You are running out of file descriptors. Search the archives for answers. -Otto