From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS14383 205.234.109.0/24 X-Spam-Status: No, score=-0.5 required=5.0 tests=AWL,MSGID_FROM_MTA_HEADER, RP_MATCHES_RCVD shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.unicorn.general Subject: Re: Unicorn 3.3.1 "Too many open files" error in kgio_tryaccept Date: Fri, 14 Jan 2011 02:47:53 +0000 Message-ID: <20110114024753.GA2453@dcvr.yhbt.net> References: <20110113230609.GA1519@dcvr.yhbt.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1294977026 5126 80.91.229.12 (14 Jan 2011 03:50:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 14 Jan 2011 03:50:26 +0000 (UTC) To: unicorn list Original-X-From: mongrel-unicorn-bounces@rubyforge.org Fri Jan 14 04:50:22 2011 Return-path: Envelope-to: gclrug-mongrel-unicorn@m.gmane.org X-Original-To: mongrel-unicorn@rubyforge.org Delivered-To: mongrel-unicorn@rubyforge.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-BeenThere: mongrel-unicorn@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: mongrel-unicorn-bounces@rubyforge.org Errors-To: mongrel-unicorn-bounces@rubyforge.org Xref: news.gmane.org gmane.comp.lang.ruby.unicorn.general:822 Archived-At: Received: from rubyforge.org ([205.234.109.19]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pdag8-0002b0-AU for gclrug-mongrel-unicorn@m.gmane.org; Fri, 14 Jan 2011 04:50:20 +0100 Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id D8231185835A; Thu, 13 Jan 2011 22:50:16 -0500 (EST) Received: from dcvr.yhbt.net (dcvr.yhbt.net [64.71.152.64]) by rubyforge.org (Postfix) with ESMTP id 690B31858354 for ; Thu, 13 Jan 2011 21:47:54 -0500 (EST) Received: from localhost (unknown [127.0.2.5]) by dcvr.yhbt.net (Postfix) with ESMTP id C8D491F76A; Fri, 14 Jan 2011 02:47:53 +0000 (UTC) ghazel@gmail.com wrote: > On Thu, Jan 13, 2011 at 3:06 PM, Eric Wong wrote: > > ghazel@gmail.com wrote: > > How does lsof output look for your workers? > > Hm. The workers seem to be at 80-90 file descriptors each. I did catch > one at 787 (!) with mostly handles to a geoip database from the geoip > gem, but they got collected pretty quickly. Perhaps that's the cause! OK, that's a fairly likely cause of EMFILE. A tip for geoip users: Install the io-extra gem to get IO.pread. This allows you to reuse the same file descriptor with geoip automatically between any number of threads/processes without reopening it. > > Does this happen with 3.3.0? > > I've only seen it once. If I manage to reproduce it I'll try with 3.3.0. The 3.3.x series generates less garbage than previous versions, so it could be causing the GC to run less frequently and increase the chance of the GC failing to collect descriptors. -- Eric Wong _______________________________________________ Unicorn mailing list - mongrel-unicorn@rubyforge.org http://rubyforge.org/mailman/listinfo/mongrel-unicorn Do not quote signatures (like this one) or top post when replying