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: AS33070 50.56.128.0/17 X-Spam-Status: No, score=1.3 required=3.0 tests=MSGID_FROM_MTA_HEADER, RDNS_NONE shortcircuit=no autolearn=no version=3.3.2 Path: news.gmane.org!not-for-mail From: Corin Langosch Newsgroups: gmane.comp.lang.ruby.rainbows.general Subject: leakage of sockets or activerecord connections Date: Fri, 23 Aug 2013 00:13:36 +0200 Message-ID: <52168D10.8080407@corinlangosch.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1377210105 32229 80.91.229.3 (22 Aug 2013 22:21:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 22 Aug 2013 22:21:45 +0000 (UTC) To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Original-X-From: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Fri Aug 23 00:21:48 2013 Return-path: Envelope-to: gclrrg-rainbows-talk@m.gmane.org X-Original-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Delivered-To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Greylist: delayed 334 seconds by postgrey-1.31 at rubyforge; Thu, 22 Aug 2013 22:18:53 UTC User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130803 Thunderbird/17.0.8 X-LX-SPF-Check: X-BeenThere: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org Errors-To: rainbows-talk-bounces-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org X-Broken-Reverse-DNS: no host name found for IP address 50.56.192.79 Xref: news.gmane.org gmane.comp.lang.ruby.rainbows.general:514 Archived-At: Received: from [50.56.192.79] (helo=rubyforge.org) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VCdGD-00007i-UE for gclrrg-rainbows-talk@m.gmane.org; Fri, 23 Aug 2013 00:21:46 +0200 Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 90A482E1D3; Thu, 22 Aug 2013 22:21:45 +0000 (UTC) Received: from mail.lunarix.de (mail.lunarix.de [185.14.157.57]) by rubyforge.org (Postfix) with ESMTP id A70BA2E1C6 for ; Thu, 22 Aug 2013 22:18:53 +0000 (UTC) Received: from 46-126-114-236.dynamic.hispeed.ch ([46.126.114.236] helo=[192.168.0.108]) by mail.lunarix.de with esmtpsa (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1VCd7x-00076F-Ij for rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org; Fri, 23 Aug 2013 00:13:13 +0200 Hi, I'm using rainbows to power my own small middleware. I doen't use rails (or any other framework), only activerecord for database access. I chose XEpollThreadSpawn, set worker_processes 1 and worker_connections 25. All classes are eager loaded, no reloading of anything while the server is running. AR connection pool size is set to 100. Now it seems that every request opens a new connection and never frees/ closes it. So after 100 requests I get an AR connection pool exception. I also see exactly 100 postgresql clients connected. When I kill the server all clients get disconnected. I wonder if I have to setup and hooks (like in unicorn before_fork etc.)? In fact I'd expect this happens automatically as the thread exits after the request is completed? Thanks, Corin _______________________________________________ Rainbows! mailing list - rainbows-talk-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org http://rubyforge.org/mailman/listinfo/rainbows-talk Do not quote signatures (like this one) or top post when replying