[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

DRb throws Errno::EMFILE "Too many open files" with 256 connections

fkattan

7/27/2007 8:41:00 PM

Hi,

I have a ruby / DRb process that is quiting with Errno::EMFILE every
time it reaches 256 connections. This happens regardless of what I set
in ulimit -n and only on Solaris.

/opt/csw/lib/ruby/1.8/drb/drb.rb:944:in `accept': Too many open files
(Errno::EMFILE)
from /opt/csw/lib/ruby/1.8/drb/drb.rb:944:in `accept'
from /opt/csw/lib/ruby/1.8/drb/drb.rb:1581:in `main_loop'
from /opt/csw/lib/ruby/1.8/drb/drb.rb:1430:in `run'
from /opt/csw/lib/ruby/1.8/drb/drb.rb:1427:in `start'
from /opt/csw/lib/ruby/1.8/drb/drb.rb:1427:in `run'
from /opt/csw/lib/ruby/1.8/drb/drb.rb:1347:in `initialize'
from /opt/csw/lib/ruby/1.8/drb/drb.rb:1627:in `new'
from /opt/csw/lib/ruby/1.8/drb/drb.rb:1627:in `start_service'
from ./tuple_space.sh:10


I also tried this test both in OSX and Solaris:

255.times {a<<File.open("/etc/hosts")}

and I got it working on OSX with a ulimit -n 2048 but it seems that
Ruby on Solaris does not change its behavior based on ulimit -n and it
still throws:

Errno::EMFILE: Too many open files - /etc/hosts
from (irb):17:in `initialize'
from (irb):17:in `open'
from (irb):17
from (irb):17:in `times'
from (irb):17


Anyone has any insight on how to get Solaris to open more than 256
files?

Thanks in advance.

14 Answers

romeda@gmail.com

7/28/2007 9:39:00 AM

0

As it turns out, I was having this problem until your post made me
realize that it was solaris (and not my program, as I had assumed).
Some research turn this up:

http://developers.sun.com/solaris/articles/stdi...

which says that 32-bit applications are limited to 256 file
descriptors when running under Solaris, unless you do the following:

export LD_PRELOAD_32=/usr/lib/extendedFILE.so.1

before running your program. Ruby on Solaris is a 32 bit app (we've
never had it compile cleanly as a 64 bit application), so this makes
sense. Except for the part about the limit of 256 file descriptors.
But oh well!

cheers,

b.

fkat...@gmail.com wrote:
> Hi,
>
> I have a ruby / DRb process that is quiting with Errno::EMFILE every
> time it reaches 256 connections. This happens regardless of what I set
> in ulimit -n and only on Solaris.
>
> /opt/csw/lib/ruby/1.8/drb/drb.rb:944:in `accept': Too many open files
> (Errno::EMFILE)
> from /opt/csw/lib/ruby/1.8/drb/drb.rb:944:in `accept'
> from /opt/csw/lib/ruby/1.8/drb/drb.rb:1581:in `main_loop'
> from /opt/csw/lib/ruby/1.8/drb/drb.rb:1430:in `run'
> from /opt/csw/lib/ruby/1.8/drb/drb.rb:1427:in `start'
> from /opt/csw/lib/ruby/1.8/drb/drb.rb:1427:in `run'
> from /opt/csw/lib/ruby/1.8/drb/drb.rb:1347:in `initialize'
> from /opt/csw/lib/ruby/1.8/drb/drb.rb:1627:in `new'
> from /opt/csw/lib/ruby/1.8/drb/drb.rb:1627:in `start_service'
> from ./tuple_space.sh:10
>
>
> I also tried this test both in OSX and Solaris:
>
> 255.times {a<<File.open("/etc/hosts")}
>
> and I got it working on OSX with a ulimit -n 2048 but it seems that
> Ruby on Solaris does not change its behavior based on ulimit -n and it
> still throws:
>
> Errno::EMFILE: Too many open files - /etc/hosts
> from (irb):17:in `initialize'
> from (irb):17:in `open'
> from (irb):17
> from (irb):17:in `times'
> from (irb):17
>
>
> Anyone has any insight on how to get Solaris to open more than 256
> files?
>
> Thanks in advance.

fkattan

8/1/2007 2:09:00 AM

0

On Jul 28, 6:38 am, Blaine Cook <rom...@gmail.com> wrote:
> As it turns out, I was having this problem until your post made me
> realize that it was solaris (and not my program, as I had assumed).
> Some research turn this up:
>
> http://developers.sun.com/solaris/articles/stdi...
>
> which says that 32-bit applications are limited to 256 file
> descriptors when running under Solaris, unless you do the following:
>
> export LD_PRELOAD_32=/usr/lib/extendedFILE.so.1
>
> before running your program. Ruby on Solaris is a 32 bit app (we've
> never had it compile cleanly as a 64 bit application), so this makes
> sense. Except for the part about the limit of 256 file descriptors.
> But oh well!
>
> cheers,
>
> b.
>
> fkat...@gmail.com wrote:
> > Hi,
>
> > I have a ruby / DRb process that is quiting with Errno::EMFILE every
> > time it reaches 256 connections. This happens regardless of what I set
> > in ulimit -n and only on Solaris.
>
> > /opt/csw/lib/ruby/1.8/drb/drb.rb:944:in `accept': Too many open files
> > (Errno::EMFILE)
> > from /opt/csw/lib/ruby/1.8/drb/drb.rb:944:in `accept'
> > from /opt/csw/lib/ruby/1.8/drb/drb.rb:1581:in `main_loop'
> > from /opt/csw/lib/ruby/1.8/drb/drb.rb:1430:in `run'
> > from /opt/csw/lib/ruby/1.8/drb/drb.rb:1427:in `start'
> > from /opt/csw/lib/ruby/1.8/drb/drb.rb:1427:in `run'
> > from /opt/csw/lib/ruby/1.8/drb/drb.rb:1347:in `initialize'
> > from /opt/csw/lib/ruby/1.8/drb/drb.rb:1627:in `new'
> > from /opt/csw/lib/ruby/1.8/drb/drb.rb:1627:in `start_service'
> > from ./tuple_space.sh:10
>
> > I also tried this test both in OSX and Solaris:
>
> > 255.times {a<<File.open("/etc/hosts")}
>
> > and I got it working on OSX with a ulimit -n 2048 but it seems that
> > Ruby on Solaris does not change its behavior based on ulimit -n and it
> > still throws:
>
> > Errno::EMFILE: Too many open files - /etc/hosts
> > from (irb):17:in `initialize'
> > from (irb):17:in `open'
> > from (irb):17
> > from (irb):17:in `times'
> > from (irb):17
>
> > Anyone has any insight on how to get Solaris to open more than 256
> > files?
>
> > Thanks in advance.

Thanks Blaine, .. this works !!.

ahall

12/11/2010 4:20:00 PM

0

Rick Saunders <retro_lad@yahoo.com> writes:

> On Dec 8, 7:58?pm, <ah...@no-spam-panix.com> wrote:
>> Rick Saunders <retro_...@yahoo.com> writes:
>> > On Dec 8, 2:18 am, Ernst Blofeld <blofel...@hotmail.com> wrote:
>> >> On Dec 7, 8:16 pm, <ah...@no-spam-panix.com> wrote:
>>
>> >> > Most models break down when having to extrapolate too far.
>>
>> >> And the climate models are doing quite a lot of extrapolation.
>>
>> >> > The real trends are right in line with the bulk of the models.
>>
>> >> Creating a model to predict the past is easy. Polynomial fit, power
>> >> N-1, knock off early for a beer.
>>
>> >> Creating models that predict what will happen outside your historical
>> >> data set is a different matter. And the performance of the climate
>> >> models in that mode is deeply unimpressive.
>>
>> > In fact, I'm unaware of any climate models that can accurately
>> > 'predict'
>> > the weather of the past several years.... or months.
>>
>> Nothing will ever accurately predict weather more than a few days out,
>> and then only with the most optimal weather condtions.
>
> And you're not bothered by the fact that climate prediction
> models are no better? Well, okay then!

You are displaying profound ignorance of modern mathematics.


--
Andrew Hall
(Now reading Usenet in alt.fan.dan-quayle...)


=======================================================================

People were out there looting their asses off... When they saw us,
they shouted, `Viva Bush!'
-- A US soldier present at the invasion of Panama.

Ernst Blofeld

12/11/2010 6:01:00 PM

0

On Dec 11, 8:19 am, <ah...@no-spam-panix.com> wrote:

> > And you're not bothered by the fact that climate prediction
> > models are no better?  Well, okay then!
>
> You are displaying profound ignorance of modern mathematics.

More likely he's pointing out that the climate models you're so
enamored with haven't done a very good job of actually predicting the
climate over the last fifteen years.

Did you read any of the climate model V&V links I provided?

Walter Harding

12/11/2010 8:12:00 PM

0

On Dec 11, 11:39 am, "5847 Dead, 990 since 1/20/09" <d...@gone.com>
wrote:
> On Sat, 11 Dec 2010 10:00:33 -0800, Ernst Blofeld wrote:
> > On Dec 11, 8:19 am, <ah...@no-spam-panix.com> wrote:
>
> >> > And you're not bothered by the fact that climate prediction models
> >> > are no better?  Well, okay then!
>
> >> You are displaying profound ignorance of modern mathematics.
>
> > More likely he's pointing out that the climate models you're so enamored
> > with haven't done a very good job of actually predicting the climate
> > over the last fifteen years.
>
> Actually, they've done a generally excellent job.

And who says they did a terrific job? Er, they do. Not hard to get a
solid "A" average when you grade your own papers.

Ernst Blofeld

12/11/2010 10:42:00 PM

0

On Dec 11, 8:19 am, <ah...@no-spam-panix.com> wrote:

> You are displaying profound ignorance of modern mathematics.


Judith Curry:
--
Q: Is this a case of politics getting in the way of science?

A: No. It’s sloppiness. It’s just how our field has evolved. One of
the things that McIntyre and McKitrick pointed out was that a lot of
the statistical methods used in our field are sloppy. We have trends
for which we don’t even give a confidence interval. The IPCC concluded
that most of the warming of the latter 20th century was very likely
caused by humans. Well, as far as I know, that conclusion was mostly a
negotiation, in terms of calling it “likely” or “very likely.”

....

Q: Are you saying that the scientific community, through the IPCC, is
asking the world to restructure its entire mode of producing and
consuming energy and yet hasn’t done a scientific uncertainty
analysis?

A: Yes.
--

Yoorghis

12/12/2010 4:21:00 AM

0

On Sat, 11 Dec 2010 10:00:33 -0800 (PST), Ernst Blofeld
<blofeld42@hotmail.com> wrote:

>Did you read any of the climate model V&V links I provided?

No---but he hasn't bought ass-wipe for a while now----

Rick Saunders

12/12/2010 6:07:00 PM

0

On Dec 11, 11:21 pm, Yoorg...@Jurgis.net wrote:
> On Sat, 11 Dec 2010 10:00:33 -0800 (PST), Ernst Blofeld
>
> <blofel...@hotmail.com> wrote:
> >Did you read any of the climate model V&V links I provided?
>
> No

Of course not. Facts must not be allowed to
interfere with blind faith in liberal ideology.

Ernst Blofeld

12/13/2010 1:22:00 AM

0


> > >Did you read any of the climate model V&V links I provided?
>
> > No
>
> Of course not. Facts must not be allowed to
> interfere with blind faith in liberal ideology.

A lot of it is a combination of status markers and an alignment
between what they already want to do and what they think AGW requires.

Status markers: you're oh-so-much smarter than those other rubes, and
you _care_. As we've seen, most of them don't even know the basics of
the scientific argument, so I'm unimpressed by them.

Alignment: if the solution to AGW required lower taxes, less
regulation, and regular church attendance, the whole idea would be
dismissed as a fascist plot by the same people now championing it. But
since they think it requires a bigger state and more opportunities to
order people about, they find themselves cottoning to the idea.

ahall

12/13/2010 1:53:00 AM

0

Ernst Blofeld <blofeld42@hotmail.com> writes:

> On Dec 11, 8:19??am, <ah...@no-spam-panix.com> wrote:
>
>> You are displaying profound ignorance of modern mathematics.
>
>
> Judith Curry:
> --
> Q: Is this a case of politics getting in the way of science?
>
> A: No. It???s sloppiness. It???s just how our field has evolved. One of
> the things that McIntyre and McKitrick pointed out was that a lot of
> the statistical methods used in our field are sloppy. We have trends
> for which we don???t even give a confidence interval. The IPCC concluded
> that most of the warming of the latter 20th century was very likely
> caused by humans. Well, as far as I know, that conclusion was mostly a
> negotiation, in terms of calling it ???likely??? or ???very likely.???
>
> ...
>
> Q: Are you saying that the scientific community, through the IPCC, is
> asking the world to restructure its entire mode of producing and
> consuming energy and yet hasn???t done a scientific uncertainty
> analysis?
>
> A: Yes.
> --

Who is Ms Curry? She sounds pretty ignorant too.

BTW, what does this have to do with Mr. Sanders lack of knowledge
about chaos mathematics?


--
Andrew Hall
(Now reading Usenet in alt.fan.dan-quayle...)


=======================================================================

The US government will make no concessions to terrorists. It will not
pay ransoms, release prisoners, change its policies or agree to other
acts that might encourage additional terrorism.
-- From the final report of the Vice President's Task
Force on Combating Terrorism, 1986.