[Mongrel] Mongrel error : EMFILE too many open files

Wayne E. Seguin wayneeseguin at gmail.com
Sat Dec 15 08:20:19 EST 2007

On Dec 14, 2007 5:16 PM, Scott Derrick <lists at ruby-forum.com> wrote:

> 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.
> The periodic render has an image_tag which appears to be opening the
> image file and its not being released emediatly?
> Anything I can do to fix this?
> Scott

First, if it's creating a session for every hit something is not correct
with the Rails code, investigate this.
If you cannot track it down try using either cookie or database sessions.

That said, if you need to have more open files you can adjust you're open
file limit:
See the file limit:

$ ulimit

Adjust the file limit:

$ ulimit 2048

^ ^ allows up to 2048 open files.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20071215/679f2095/attachment.html 

More information about the Mongrel-users mailing list