Forum Moderators: open

Message Too Old, No Replies

Critical Error: "Too many open files in system"

mysql crash error

         

xnavigator

9:44 pm on Jan 23, 2008 (gmt 0)

10+ Year Member



Hi, my server mysql is crashing every 30min .....
in var/log/mysqld.log I see the error:

"Too many open files in system" Or "Error in accept: Too many open files in system"

I don't know what should I do... I can access to my server with ssh (root)

I have see this url [mail-index.netbsd.org...]

but is too complicated for me, I am new to linux OS..

However I have launch the command: "cat /proc/sys/fs/file-nr"
that sholud tell "(max number of files simultaneously open since boot) (how many files are open
right now) (max number of files allowed to be simultaneously open)" and return me:
63.828 - 0 - 262144

THANKS (..please help me..)
(sorry for my english)

lammert

10:08 am on Jan 24, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



63,000 seems an awful lot of open files and you still have 200,000 to go before you reach the maximum allowed number of 262,144 on your system. Normally that should be enough for a database/webserver system.

A problem might be, that the your mysql is running under a seperate user account, not user root, and that that user account has a lower limit set on the allowed number of open files. You can increase amount of open file descriptors for mysql with the ulimit -n value command in the script that starts the mysql database, but many systems are setup in such a way that they don't allow the number of file descriptors to be increased for a single process. So it's a bit trial and error.

xnavigator

3:35 pm on Jan 24, 2008 (gmt 0)

10+ Year Member



yes, I have exec the ulimit -n 2048 and I restarted mysql

now It seems that there aren't problems

thank