Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 63436 invoked from network); 16 Nov 2009 15:52:31 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Nov 2009 15:52:31 -0000 Received: (qmail 5923 invoked by uid 500); 16 Nov 2009 15:52:30 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 5881 invoked by uid 500); 16 Nov 2009 15:52:29 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 5872 invoked by uid 99); 16 Nov 2009 15:52:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Nov 2009 15:52:29 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: 207.173.203.201 is neither permitted nor denied by domain of david@kineticode.com) Received: from [207.173.203.201] (HELO smtp.kineticode.com) (207.173.203.201) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Nov 2009 15:52:20 +0000 Received: from [10.0.1.14] (c-24-21-193-250.hsd1.or.comcast.net [24.21.193.250]) by smtp.kineticode.com (Postfix) with ESMTPSA id 539ED50805B; Mon, 16 Nov 2009 07:49:30 -0800 (PST) Subject: Re: DBI Connectons accumulate under Mod_perl Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: "David E. Wheeler" In-Reply-To: <4B011702.7070402@itlegion.ru> Date: Mon, 16 Nov 2009 07:51:56 -0800 Cc: Perrin Harkins , "Kulasekaran, Raja" , modperl@perl.apache.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <4ADDEC61.2080300@itlegion.ru> <4AF9810E.9050001@itlegion.ru> <1440789C-0B10-44FC-A6CE-6256FA08EE85@kineticode.com> <4AFD2B24.1010100@itlegion.ru> <66887a3d0911131040v4f4e6cbeud9e032dd2da854f6@mail.gmail.com> <4B011702.7070402@itlegion.ru> To: Artem Kuchin X-Mailer: Apple Mail (2.1077) X-Virus-Checked: Checked by ClamAV on apache.org On Nov 16, 2009, at 1:10 AM, Artem Kuchin wrote: > I am the original poster. Someone else has stolen my thread. > Anyway. > I AM calling disconnect and the thing is wrapped in > sub handler { > my $db=3D... >=20 > ... >=20 > $db->disconnect(); > } >=20 > So, everything goes out of scope when handler finishes. I made it so = to play nice with mod_per. NO globals > at all. >=20 > The apache run two site with such code. One site does not have a = problem another builds up the connection. > It might be related to windows (it is all under windows and i never = had such problem under freebsd). Maybe you have a system call or some other forking call that can lead to = stray handles? Some Perl modules will do it without you knowing. I = suggest switching to DBIx::Connector, which detects such things, to see = if it helps. Best, David=