[Mongrel] Mongrel error : EMFILE too many open files
luislavena at gmail.com
Fri Dec 21 14:29:51 EST 2007
On Dec 21, 2007 12:37 PM, Scott Derrick <lists at ruby-forum.com> wrote:
> Well, at 1 hour 15 minutes webrick froze. I had to kill it and it
> output two "deadlock" errors.
> I guess rails just can't handle running periodically_call_remote with an
> interval shorter than 1 second. eventually two calls are synced up and
> it deadlocks. the faster I run periodically.. the sooner the deadlock.
You're trying to handle too many things in less than 1 second, and
just 1 instance of most of web frameworks in ruby will not handle it
I don't know if periodically_call_remote opens a new connection to the
server, but that could mean it's exhausting available file handlers
and thus, ending in the problem you're getting.
Maybe you need a different approach to this problem, why not push
server instead of pulling ones? Take a look at comet-like
> If I run lighttpd as a load balancer with cluster would that alleviate
> the problem? If that is the problem?
Alleviate: yes, solve: no-
As I said, you need a different strategy of this problem, and not
"drop more hardware to the problem" -- this will not solve it, just
delay the inevitable end: server crash.
A common mistake that people make when trying to design
something completely foolproof is to underestimate
the ingenuity of complete fools.
More information about the Mongrel-users