Re: Apache::DBI "connection lost contact" error

2013-06-13 Thread Xinhuan Zheng
rrin Harkins mailto:phark...@gmail.com>> Date: Thursday, June 13, 2013 11:03 AM To: Xinhuan Zheng mailto:xzh...@christianbook.com>> Cc: "modperl@perl.apache.org<mailto:modperl@perl.apache.org>" mailto:modperl@perl.apache.org>> Subject: Re: Apache::DBI "connection lost co

Re: Apache::DBI "connection lost contact" error

2013-06-13 Thread Perrin Harkins
: Fred Moyer > Cc: Xinhuan Zheng , "modperl@perl.apache.org" < > modperl@perl.apache.org> > > Subject: Re: Apache::DBI "connection lost contact" error > > Thanks Fred! > > > On Wed, Jun 12, 2013 at 3:29 AM, Fred Moyer wrote: > >> Apac

Re: Apache::DBI "connection lost contact" error

2013-06-12 Thread Xinhuan Zheng
y, June 12, 2013 5:53 AM To: Fred Moyer mailto:f...@redhotpenguin.com>> Cc: Xinhuan Zheng mailto:xzh...@christianbook.com>>, "modperl@perl.apache.org<mailto:modperl@perl.apache.org>" mailto:modperl@perl.apache.org>> Subject: Re: Apache::DBI "connection lost co

Re: Apache::DBI "connection lost contact" error

2013-06-12 Thread Perrin Harkins
I don't see the "connection lost > contact" > >> error anymore. The patch looks good to me. > >> > >> Thanks, > >> - xinhuan > >> > >> From: Perrin Harkins > >> Date: Thursday, June 6, 2013 3:02 PM > >> To: Xinh

Re: Apache::DBI "connection lost contact" error

2013-06-12 Thread Fred Moyer
n >> >> From: Perrin Harkins >> Date: Thursday, June 6, 2013 3:02 PM >> To: Xinhuan Zheng >> Cc: "modperl@perl.apache.org" >> >> Subject: Re: Apache::DBI "connection lost contact" error >> >> On Thu, Jun 6, 2013 at 12:22 PM, X

Re: Apache::DBI "connection lost contact" error

2013-06-06 Thread Perrin Harkins
r anymore. The patch looks good to me. > > Thanks, > - xinhuan > > From: Perrin Harkins > Date: Thursday, June 6, 2013 3:02 PM > To: Xinhuan Zheng > Cc: "modperl@perl.apache.org" > > Subject: Re: Apache::DBI "connection lost contact" error > &g

Re: Apache::DBI "connection lost contact" error

2013-06-06 Thread Xinhuan Zheng
hristianbook.com>> Cc: "modperl@perl.apache.org<mailto:modperl@perl.apache.org>" mailto:modperl@perl.apache.org>> Subject: Re: Apache::DBI "connection lost contact" error On Thu, Jun 6, 2013 at 12:22 PM, Xinhuan Zheng mailto:xzh...@christianbook.com>>

Re: Apache::DBI "connection lost contact" error

2013-06-06 Thread Perrin Harkins
On Thu, Jun 6, 2013 at 12:22 PM, Xinhuan Zheng wrote: > The database handle that is created in startup.pl needs to be really disconnected (not overloaded disconnect) so that won't leave an idle server > process running on the database side. Once it's really disconnected, the server process can be

Re: Apache::DBI "connection lost contact" error

2013-06-06 Thread Xinhuan Zheng
om>> Cc: Jim Schueler mailto:jschue...@eloquency.com>>, "modperl@perl.apache.org<mailto:modperl@perl.apache.org>" mailto:modperl@perl.apache.org>> Subject: Re: Apache::DBI "connection lost contact" error On Tue, Jun 4, 2013 at 2:32 PM, Xinhuan Zheng ma

Re: Apache::DBI "connection lost contact" error

2013-06-05 Thread Perrin Harkins
On Tue, Jun 4, 2013 at 2:32 PM, Xinhuan Zheng wrote: > I have seen in other web servers when apachectl starts, there is no "connect lost contact" error but it did happen when apachectl stops. If your server does not receive constant requests, you may see this error on shutdown because cached data

Re: Apache::DBI "connection lost contact" error

2013-06-04 Thread Xinhuan Zheng
odperl@perl.apache.org>> Subject: Re: Apache::DBI "connection lost contact" error On Tue, Jun 4, 2013 at 9:59 AM, Xinhuan Zheng mailto:xzh...@christianbook.com>> wrote: > Will the new connection that's created be cached after then and the > connection that's not p

Re: Apache::DBI "connection lost contact" error

2013-06-04 Thread Perrin Harkins
On Tue, Jun 4, 2013 at 9:59 AM, Xinhuan Zheng wrote: > Will the new connection that's created be cached after then and the connection that's not ping-able will be discarded? Yes. > Will this cached the new connection last until the child process exit? Yes, unless it times out on the Oracle side

Re: Apache::DBI "connection lost contact" error

2013-06-04 Thread Xinhuan Zheng
m>> Date: Monday, June 3, 2013 5:14 PM To: Xinhuan Zheng mailto:xzh...@christianbook.com>> Cc: Jim Schueler mailto:jschue...@eloquency.com>>, "modperl@perl.apache.org<mailto:modperl@perl.apache.org>" mailto:modperl@perl.apache.org>> Subject: Apache::DBI "

Re: Apache::DBI "connection lost contact" error

2013-06-04 Thread Perrin Harkins
On Mon, Jun 3, 2013 at 4:36 PM, Dave Morgan wrote: > As an administrator I still rely and depend on Apache::DBI, even if it is unsupported. Can we kill this rumor please? Apache::DBI is supported. - Perrin

Re: Apache::DBI "connection lost contact" error

2013-06-03 Thread Fred Moyer
On Mon, Jun 3, 2013 at 2:36 PM, Dave Morgan wrote: > On 06/03/2013 03:14 PM, Perrin Harkins wrote: > > DO NOT USE Apache::DBI with DBI::Connector or any other database caching > technique. This requires > knowledge of the code!!! DBIx::Class monkey patches Apache::DBI so that the caching behavior

Re: Apache::DBI "connection lost contact" error

2013-06-03 Thread Dave Morgan
On 06/03/2013 03:14 PM, Perrin Harkins wrote: On Monday, June 3, 2013, Xinhuan Zheng wrote: > What is the check to see if the server is restarting? Is that new child processes spawning? I always found the best way to run/test Apache::DBI was to run a mod-perl enabled http server without Apac

Apache::DBI "connection lost contact" error

2013-06-03 Thread Perrin Harkins
On Monday, June 3, 2013, Xinhuan Zheng wrote: > What is the check to see if the server is restarting? Is that new child 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::ServerU

Re: Apache::DBI "connection lost contact" error

2013-06-03 Thread Xinhuan Zheng
Hi Perrin, > Does Apache::DBI work right with Apache2+mod_perl2? Yes, but there may be a bug in how it checks to see if the server is restarting. What is the check to see if the server is restarting? Is that new child processes spawning? If there is a bug in how it checks to see if the server

Re: Apache::DBI "connection lost contact" error

2013-06-01 Thread Perrin Harkins
On Fri, May 31, 2013 at 5:45 PM, Xinhuan Zheng wrote: > 2520 Apache::DBI skipping connection during server startup, read the docu !! > 2520 Apache::DBI skipping connection during server startup, read the docu !! That's good. > 2521 Apache::DBI push PerlChildEx

Re: Apache::DBI "connection lost contact" error

2013-05-31 Thread Xinhuan Zheng
>> Cc: Xinhuan Zheng mailto:xzh...@christianbook.com>>, "modperl@perl.apache.org<mailto:modperl@perl.apache.org>" mailto:modperl@perl.apache.org>> Subject: Re: Apache::DBI "connection lost contact" error $Apache::DBI::DEBUG = 2

Re: Apache::DBI "connection lost contact" error

2013-05-31 Thread Perrin Harkins
Well, you are on the modperl list, so that means you. :) Xinhuan, the error is harmless, but if you're concerned about it I would try turning on debugging to make sure the connection is not being cached. Do this: $Apache::DBI::DEBUG = 2; And then watch for a message like this in your log: skippi

Re: Apache::DBI "connection lost contact" error

2013-05-31 Thread Jim Schueler
I'm afraid I'm out of my league. I just noticed the following comment on the Apache::DBI man page: Edmund Mergl was the original author of Apache::DBI. It is now supported and maintained by the modperl mailinglist, see the mod_perl documentation for instructions on how to subscribe. -Ji

Re: Apache::DBI "connection lost contact" error

2013-05-31 Thread Xinhuan Zheng
I believe I am using "my" declaration rather than "local". I also tried explicitly disconnect but still have same issue. Since it only happens in parent/child processes, I don't know a good way to debug parent/child, nor reproducing the same error using a simple program. Can you guys help me with t

Re: Apache::DBI "connection lost contact" error

2013-05-31 Thread Jim Schueler
Perrin is right. But fundamentally, I'd say that you're confusing 'local' and 'my' variable scoping: http://www.perlmonks.org/?node_id=94007 -Jim On Fri, 31 May 2013, Perrin Harkins wrote: Try an explicit disconnect() call. - Perrin On Thu, May 30, 2013 at 7:46 PM, Xinhuan Zheng wrot

Re: Apache::DBI "connection lost contact" error

2013-05-31 Thread Perrin Harkins
Try an explicit disconnect() call. - Perrin On Thu, May 30, 2013 at 7:46 PM, Xinhuan Zheng wrote: > The db handle is declared local and once it's out of scope, the destroy > call will disconnect. But it appears even though variable is out of scope, > we still get that error. Don't know why. > -

Re: Apache::DBI "connection lost contact" error

2013-05-30 Thread Xinhuan Zheng
The db handle is declared local and once it's out of scope, the destroy call will disconnect. But it appears even though variable is out of scope, we still get that error. Don't know why. - xinhuan On 5/30/13 8:31 AM, "Jim Schueler" wrote: >Did this solve your problem? > > -Jim > >On Wed, 29 Ma

Re: Apache::DBI "connection lost contact" error

2013-05-30 Thread Jim Schueler
Did this solve your problem? -Jim On Wed, 29 May 2013, Perrin Harkins wrote: Hi, Apache::DBI is supposed to skip caching if you connect during startup.  You should just need to disconnect your database handle after you finish with it.  It sounds like you're opening it and then leaving it open

Re: Apache::DBI "connection lost contact" error

2013-05-29 Thread Perrin Harkins
Hi, Apache::DBI is supposed to skip caching if you connect during startup. You should just need to disconnect your database handle after you finish with it. It sounds like you're opening it and then leaving it open. - Perrin On Wed, May 29, 2013 at 3:24 PM, Xinhuan Zheng wrote: > Hi, > > I

Re: Apache::DBI "connection lost contact" error

2013-05-29 Thread Jim Schueler
A few questions: Precisely when do you get this error? When startup.pl exits or before? Can you send a copy of your startup.pl file? You get exactly the same error on startup and shutdown? If PerlRequire startup.pl is commented out, do you still get errors? Do you get errors when a

Apache::DBI "connection lost contact" error

2013-05-29 Thread Xinhuan Zheng
Hi, I have apache 2.2.23 statically compiled with mod_perl2 (prefork). perl binary is 5.10.1. In startup.pl file there is call Apache::DBI->connect_on_init. use Apache::DBI; Apache::DBI->connect_on_init( $DB_DRIVER, $DB_USER, $DB_PASSWORD ); use DBI; I need to call DBI->