Forum: Ruby on Rails File descriptor leak in Mongrel server?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
5a726e23b511c0328121fbbdc30fe0b7?d=identicon&s=25 psujohn (Guest)
on 2009-01-31 12:50
(Received via mailing list)
Excuse my ignorance for I'm a RoR newby.

We have a number of RoR applications running on a server with a cPanel
installation. One of the clients sites went belly up with the error
message:
Errno::EMFILE
Too many open files - socket(2)

Digging a bit I found that the mongrel server had a large number of
sockets open and appears to be leaking them fairly frequently. The
lsof looks like this

mongrel_r 11184 username 193u  unix 0xda4fa480          637209350
socket
mongrel_r 11184 username 194u  unix 0xf685a680          637408911
socket
mongrel_r 11184 username 195u  unix 0xcc2ea3c0         637684747
socket

The application doesn't do anything explicitly with sockets. As far as
I know the RoR installation is standard - from what I understand the
hosting company support installed it and RoR is only semi-supported by
cPanel so they're somewhat reluctant/lack the knowledge to be of much
assistance?

I did google searches of every combination of ruby/rails/socket/leak/
cPanel/file descriptor/etc that I could think of and didn't find
anything. I'm not exactly sure of what versions of ruby/rails/mongrel
we have installed but didn't find anything about this being a known
issue that had been fixed. I'd warrant a guess that we're not running
the bleeding edge at any rate and are likely a few versions behind but
again I'm not entirely sure how ruby is installed/managed under cPanel/
WHM.

Any ideas on where to look further or what the issue could be?
This topic is locked and can not be replied to.