From: Roger Pack Date: 2009-05-12T00:56:14+09:00 Subject: Re: Too many open files > Thank you very much for your reply. It makes me understand the limit. > But why do I have only 256 limit not even 512? I use Ruby 1.8.6 version > and run on XP. If I can make my limit to 512, it will help little bit. It's 256 because after ruby code opens any file descriptor it "dup's" them for internal use (for some reason--I can't remember why it's explained in the code). > Since my application is not that time critical, I use a single thead to > do the select. and slice all sockets into multiple a group of 64 i/o > array. I have got around of 64 limit. my problem is realy 256 max open > file limit. What I can do to make it at least 512? Maybe by recompiling ruby using a newer MSVC compiler. Or figuring out how to compile the mingw one and have it *link* against a different version of msvcrt (I've heard it's possible to have mingw link against an arbitrary version of msvcrt.dll--it defaults to version 6--I have not yet heard of anybody trying that with ruby, though it should be possible). You might be able to use rev instead (which which require a rewrite, but might give you more descriptors)--I'll check on its limit sometime. http://github.com/rogerdpack/rev/tree/master version compiles well for mingw. -=r -- Posted via http://www.ruby-forum.com/.