[Mongrel] Mongrel error : EMFILE too many open files

Luis Lavena luislavena at gmail.com
Fri Dec 14 17:25:08 EST 2007


On Dec 14, 2007 7:16 PM, Scott Derrick <lists at ruby-forum.com> wrote:
> I have a periodically_call_remote call in a partial running at 0.20
> times a second.
>
[...]
>
> after a couple minutes I get the following error
>
> Errno::EMFILE (Too many open files -
> script/../config/../tmp/sessions//ruby_sess.3b99572316c49027):
>
> Once this happens mongrel can't find anything. the only recovery is the
> restart the web server.
>

First suggestion: move away from pstore for session storage (use
activerecord, sqlstore or even memcached one, but no pstore).

> The periodic render has an image_tag which appears to be opening the
> image file and its not being released emediatly?
>

image_tag shouldn't be opening any file, just linking it.

PStore isn't good when tmp/sessions is full or one ruby process is
trying to handle lot of sessions (which will exceed 1024 file limit).

-- 
Luis Lavena
Multimedia systems
-
A common mistake that people make when trying to design
something completely foolproof is to underestimate
the ingenuity of complete fools.
Douglas Adams


More information about the Mongrel-users mailing list