MySQL Forums
Forum List  »  Performance

Re: merge tables running out of file descriptors and causing mysql to crash
Posted by: Michael Stoppelman
Date: May 19, 2005 04:38PM

> You mean FLUSH TABLES ?

Yes. I wrote a script to run "FLUSH TABLES" every minute. I'm willing to take
the performance hit because I really can't have my database crashing.

>
> What's the maximum value that's allowed for your
> operating system/kernel? MySQL is limited to the
> values that are accepted by the system call
> setrlimits(). If setrlimits() fails, MySQL will go
> back to the value that's been configured before
> MySQL tried to set it. It might well be that your
> OS limit is 65k.

I've changed proc to the following:

$ cat /proc/sys/fs/file-max
4000000

It seems like mysql must have some internal limits per thread. Not sure exactly. But as soon as my
machine hits 600,000 file descriptors the database goes to hell.


If there is a way to tell mysql to close file descriptors as soon as the client disconnects I would be in good shape. If anyone knows how force a flush tables on clients that disconnect this would help a lot. Basically I get a lot of dangling file descriptors from disconnected clients. They build up and then I have 600,000 files open.

I'll start packing tables if I have no other options :/.

-Mike

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.