From modperl-return-63367-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Tue Jun 4 15:00:14 2013 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E3A9B10804 for ; Tue, 4 Jun 2013 15:00:14 +0000 (UTC) Received: (qmail 86241 invoked by uid 500); 4 Jun 2013 15:00:14 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 86189 invoked by uid 500); 4 Jun 2013 15:00:14 -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 86182 invoked by uid 99); 4 Jun 2013 15:00:13 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jun 2013 15:00:13 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of xzheng@christianbook.com designates 208.68.76.78 as permitted sender) Received: from [208.68.76.78] (HELO dmzpostal.cckh.com) (208.68.76.78) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Jun 2013 15:00:09 +0000 Received: from tigger2.cbdadmin.com ([10.10.1.140]) by dmzpostal.cckh.com (8.12.8/8.12.8) with ESMTP id r54ExiEh031324; Tue, 4 Jun 2013 10:59:44 -0400 Received: from cougar.cbdadmin.com (cougar.cbdadmin.com [10.10.1.210]) by tigger2.cbdadmin.com (8.13.8/8.13.8) with ESMTP id r54Exjob001432; Tue, 4 Jun 2013 10:59:45 -0400 Received: from cougar.cbdadmin.com ([::1]) by cougar.cbdadmin.com ([::1]) with mapi id 14.02.0247.003; Tue, 4 Jun 2013 10:59:45 -0400 From: Xinhuan Zheng To: Perrin Harkins CC: Jim Schueler , "modperl@perl.apache.org" Subject: Re: Apache::DBI "connection lost contact" error Thread-Topic: Apache::DBI "connection lost contact" error Thread-Index: AQHOXKIh3fPzO3Xb8Uq1FtDcASri05kc5b4AgAEHJQCAAHmXgIABDDaAgAAVWYD//7/bAIAAWXsAgAAF/oCAAGH5AIABLg4AgALhmwCAAK9dgIAA5qeA Date: Tue, 4 Jun 2013 14:59:43 +0000 Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.3.4.130416 x-originating-ip: [10.10.182.55] Content-Type: multipart/alternative; boundary="_000_CDD3772D3DF58xzhengchristianbookcom_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_CDD3772D3DF58xzhengchristianbookcom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Perrin, > It looks to me like there's no danger here, just an annoying error messag= e. Your connection from the parent process is being passed across the fork= , but then when each child process tries to check it with ping() it fails a= nd a new connection is opened to replace it. It looks like we still can use the way we do with Apache::DBI safely. The c= hild process creates the new connection and replaces the one that's inherit= ed but not ping-able. Will the new connection that's created be cached afte= r then and the connection that's not ping-able will be discarded? Will this= cached the new connection last until the child process exit? Will rollback be called when child process discovers the connection handle = not ping-able? Will rollback be called when child process exit? Thanks, - xinhuan From: Perrin Harkins > Date: Monday, June 3, 2013 5:14 PM To: Xinhuan Zheng > Cc: Jim Schueler >,= "modperl@perl.apache.org" > Subject: Apache::DBI "connection lost contact" error On Monday, June 3, 2013, Xinhuan Zheng wrote: > What is the check to see if the server is restarting? Is that new child p= rocesses spawning? It's a test for whether or not we're running in the parent process, used to= skip caching connections during startup. It's this, line 128: if (Apache2::ServerUtil::restart_count() =3D=3D 1) { > If there is a bug in how it checks to see if the server is restarting, do= es it affect putting it into production use? It looks to me like there's no danger here, just an annoying error message.= Your connection from the parent process is being passed across the fork, = but then when each child process tries to check it with ping() it fails and= a new connection is opened to replace it. I'll investigate the possible bug further when I get back from the conferen= ce I'm at right now (YAPC::NA in Austin). - Perrin --_000_CDD3772D3DF58xzhengchristianbookcom_ Content-Type: text/html; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable
Hi Perrin,

> It looks to me like there's no danger here, just an annoying erro= r message.  Your connection from the parent process is being passed ac= ross the fork, but then when each child process tries to check it with ping= () it fails and a new connection is opened to replace it.

It looks like we still can use the way we do with Apache::DBI safely. = The child process creates the new connection and replaces the one that's in= herited but not ping-able. Will the new connection that's created be cached= after then and the connection that's not ping-able will be discarded? Will this cached the new connection last = until the child process exit?

Will rollback be called when child process discovers the connection ha= ndle not ping-able?

Will rollback be called when child process exit?

Thanks,
- xinhuan

From: Perrin Harkins <pharkins@gmail.com>
Date: Monday, June 3, 2013 5:14 PM<= br> To: Xinhuan Zheng <xzheng@christianbook.com>
Cc: Jim Schueler <jschueler@eloquency.com>, "modperl@perl.apache.org" <<= a href=3D"mailto:modperl@perl.apache.org">modperl@perl.apache.org> Subject: Apache::DBI "connecti= on lost contact" error

On Monday, June 3, 2013, Xinhuan Zheng wrote:
> What is the check to see if the server is restarting? Is that new chil= d processes spawning?

It's a test for whether or not we're running in the parent process, used to= skip caching connections during startup. It's this, line 128:
if (Apache2::ServerUtil::restart_count() =3D=3D 1) {

> If there is a bug in how it checks to see if the server is restarting,= does it affect putting it into production use? 

It looks to me like there's no danger here, just an annoying error mes= sage.  Your connection from the parent process is being passed across = the fork, but then when each child process tries to check it with ping() it= fails and a new connection is opened to replace it.

I'll investigate the possible bug further when I get back from the con= ference I'm at right now (YAPC::NA in Austin).

- Perrin

--_000_CDD3772D3DF58xzhengchristianbookcom_--