I can't increase open files limit for mysql above 1024
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I think you are out of luck. The upper limit for most software using the select system call is 1024 files.
The reason I mention select is that when a server has multiple files open (as in MySQL), it traditionally uses the select system call to multiplex the file I/O.
I don't think MySQL is using the poll system call instead - it takes a bit more programming to get it to work, and select is simpler, though more limited (you have to build an array of file descriptors + events you expect, with select you just specify the fdset (a bit array) - but it only allows for simple input or output events; poll has about 8 different events possible).
It would appear that the op did that - which is why the ulimit command listed a hard limit of 32000, and a soft limit of 24000.
The only thing left is the limit on files that can be handled by select. And that is not something that can be changed easily.
1 - you have to recompile the kernel to change the allocation size
2 - you have to recompile libc to get the new limit in the include files and binaries
3 - you have to recompile all applications that use select.
The reason this is so tricky is because an fdset is a static structure. Each application compiled gets the size of the structure from the header... and the runtime (and kernel) get that limit built in.
Now applications running with a large open file limit can use more than 1024 files... They just can't use a fd greater than the limit (1024) in the fdset and select system call. This was one of the reasons the poll and epoll system calls were implemented. But a lot of legacy code exists that just don't normally use that many and never migrated to the new system calls.
Thank you very much for your replies… I think it is mission impossible for me to do what you have suggested because I'm somehow mmmmm newbie , and no Tom Cruise .
It is a live system I can't bring it down.
grim76, thank you for your reply, I'm using Ubuntu 12.04.1 LTS.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.