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->

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

2013-05-30 Thread Xinhuan Zheng
're opening it and then leaving it open. >> >> - Perrin >> >> >> On Wed, May 29, 2013 at 3:24 PM, Xinhuan Zheng >> >> wrote: >> Hi, >> >> I have apache 2.2.23 statically compiled with mod_perl2 (prefork). >> per

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

2013-05-31 Thread Xinhuan Zheng
> > -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 >> >> wrote: >> The db handle is declared local and once it's

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

2013-05-31 Thread Xinhuan Zheng
OR: OCISessionEnd) during global destruction. Are children using same Database Handle? Does Apache::DBI work right with Apache2+mod_perl2? Thanks, - xinhuan From: Perrin Harkins mailto:phark...@gmail.com>> Date: Friday, May 31, 2013 10:54 AM To: Jim Schueler mailto:jschue...@eloquency.com

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-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 Xinhuan Zheng
n From: Perrin Harkins mailto:phark...@gmail.com>> Date: Tuesday, June 4, 2013 12:18 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:m

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

2013-06-06 Thread Xinhuan Zheng
be cleaned up on the server side. For child processes, I guess they don't need to really disconnect until the time the child exits. Thanks, - xinhuan From: Perrin Harkins mailto:phark...@gmail.com>> Date: Wednesday, June 5, 2013 12:08 PM To: Xinhuan Zheng mailto:xzh...@christianbook.c

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

2013-06-06 Thread Xinhuan Zheng
Hi Perrin, I did a testing with debugging. I don't see the "connection lost contact" error anymore. The patch looks good to me. Thanks, - xinhuan From: Perrin Harkins mailto:phark...@gmail.com>> Date: Thursday, June 6, 2013 3:02 PM To: Xinhuan Zheng mailto:xzh...@c

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-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: mysql connection pooling

2013-10-24 Thread Xinhuan Zheng
Hi Perrin, I am facing a similar issue with Oracle database. Tim's slides doesn’t explain details of implementation. I have Apache httpd with mod_perl and DBI. Without many code changes, what does the proxy server look like to achieve the database connection pooling? What is "Apache running DBI

Apache::DBI connect

2013-11-06 Thread Xinhuan Zheng
Hi, I am using Apache+mod_perl and Apache::DBI with Oracle connection pooling feature. I noticed a problem with subroutine connect. Below code checks database connection: 200:if ($Connected{$Idx} and (!$needping or eval{$Connected{$Idx}->ping})) { debug(2, "$prefix already connecte

Re: Apache::DBI connect

2013-11-06 Thread Xinhuan Zheng
ed with "ORA-03114" and the httpd process is in CLOSE_WAIT state. How does it thinks it's already connected while it's actually not? * xinhuan -----------

Re: Apache::DBI connect

2013-11-07 Thread Xinhuan Zheng
t. The Apache::DBI cached a dead database handle for apache version 1.3.42 if startup.pl create a database handle. The apache child processes inherits this dead handle. It doesn't cause application error but it does take memory space. If there is many apache processes, that's not goo

Re: Apache::DBI connect

2013-11-07 Thread Xinhuan Zheng
don't understand that piece of code. I can't do the change. Hope you can help. - xinhuan From: Perrin Harkins mailto:phark...@gmail.com>> Date: Thursday, November 7, 2013 11:00 AM To: Xinhuan Zheng mailto:xzh...@christianbook.com>> Cc: mod_perl list mailto:modperl@perl.apac

Re: Apache::DBI connect

2013-11-07 Thread Xinhuan Zheng
one correct - In both cases, the return value is evaluated to false. How do you distinguish? - xinhuan From: Xinhuan Zheng mailto:xzh...@christianbook.com>> Date: Thursday, November 7, 2013 11:12 AM To: Perrin Harkins mailto:phark...@gmail.com>> Cc: mod_perl list mailto:modperl@per

Re: Apache::DBI connect

2013-11-07 Thread Xinhuan Zheng
ic then it's false, which is what your eval example below is doing. > >Adam > > >On 13-11-07 11:29 AM, Xinhuan Zheng wrote: >> one correct - In both cases, the return value is evaluated to false. >> >> How do you distinguish? >> >> - xinhuan >> &g

Re: Apache::DBI connect

2013-11-07 Thread Xinhuan Zheng
phark...@gmail.com>> Date: Thursday, November 7, 2013 1:00 PM To: Xinhuan Zheng mailto:xzh...@christianbook.com>> Cc: Adam Prime mailto:adam.pr...@utoronto.ca>>, "modperl@perl.apache.org<mailto:modperl@perl.apache.org>" mailto:modperl@perl.apache.org>> Subje

Re: Apache::DBI connect

2013-11-07 Thread Xinhuan Zheng
s the difference between the two? Why the code in favor of "or" instead of "and"? - xinhuan From: Perrin Harkins mailto:phark...@gmail.com>> Date: Thursday, November 7, 2013 3:05 PM To: Xinhuan Zheng mailto:xzh...@christianbook.com>> Cc: Adam Prime mailto:ada

Re: Apache::DBI connect

2013-11-07 Thread Xinhuan Zheng
are subclasses inherited from this base class. Is that good idea to store a database handle in a base class? - xinhuan From: Perrin Harkins mailto:phark...@gmail.com>> Date: Thursday, November 7, 2013 8:08 PM To: Xinhuan Zheng mailto:xzh...@christianbook.com>> Cc: Adam Prime

Re: Apache::DBI connect

2013-11-08 Thread Xinhuan Zheng
class? Then every time it needs fetch/insert,etc, call DBI->connect_cached instead since that way Apache::DBI->connect will be called and the connection can be validated? - xinhuan From: Perrin Harkins mailto:phark...@gmail.com>> Date: Friday, November 8, 2013 10:41 AM To:

Re: Apache::DBI connect

2013-11-11 Thread Xinhuan Zheng
, 2013 9:57 AM To: Xinhuan Zheng mailto:xzh...@christianbook.com>> Cc: Adam Prime mailto:adam.pr...@utoronto.ca>>, "modperl@perl.apache.org<mailto:modperl@perl.apache.org>" mailto:modperl@perl.apache.org>> Subject: Re: Apache::DBI connect On Fri, Nov

Disconnect database connection after idle timeout

2014-11-12 Thread Xinhuan Zheng
Hello, I am having a database connection management question. Our apache+mod_perl application initiates a database connection request when it needs to then do data processing. Afterwards, if there is no more requests coming to this apache process, the database connection basically will be sitti

Re: Disconnect database connection after idle timeout

2014-11-13 Thread Xinhuan Zheng
more gracefully. Would it be possible to implement that? Or is it too hard to implement? - xinhuan From: Paul Silevitch mailto:p...@silevitch.com>> Date: Wednesday, November 12, 2014 at 11:53 PM To: Xinhuan Zheng mailto:xzh...@christianbook.com>>, modperl mailto:modperl@perl.apache.o

Re: Disconnect database connection after idle timeout

2014-11-13 Thread Xinhuan Zheng
...@lariat.co>> Date: Thursday, November 13, 2014 at 10:01 AM To: Perrin Harkins mailto:phark...@gmail.com>> Cc: Xinhuan Zheng mailto:xzh...@christianbook.com>>, Paul Silevitch mailto:p...@silevitch.com>>, modperl mailto:modperl@perl.apache.org>> Subject: Re: Discon

Re: Disconnect database connection after idle timeout

2014-11-13 Thread Xinhuan Zheng
I guess we do need connection caching and have persistent connections. It is good in our situation. But I would feel oracle 11g connection pooling might be more appropriate option to handle idle connection time out issue. Having another tier (like DBD::Gofer) looks like really messy in infrastru

Re: Disconnect database connection after idle timeout

2014-11-13 Thread Xinhuan Zheng
Hi Perrin, I don’t quite understand what you mean by setting up a front-end proxy. What would you expect this “proxy” do? Does it take HTTP request? Thanks, - xinhuan From: Perrin Harkins mailto:phark...@gmail.com>> Date: Thursday, November 13, 2014 at 12:50 PM To: Xinhuan Zheng mail

Re: Disconnect database connection after idle timeout

2014-11-13 Thread Xinhuan Zheng
of the front end server but behind the load balancer? - xinhuan From: Perrin Harkins mailto:phark...@gmail.com>> Date: Thursday, November 13, 2014 at 2:23 PM To: Xinhuan Zheng mailto:xzh...@christianbook.com>> Cc: mod_perl list mailto:modperl@perl.apache.org>> Subject: Re: D

Re: Disconnect database connection after idle timeout

2014-11-13 Thread Xinhuan Zheng
g through a front end server to memcache then a response back to a front end server to remote client. That’s the value I am seeing. I am not sure if this is the right understanding. - xinhuan From: Perrin Harkins mailto:phark...@gmail.com>> Date: Thursday, November 13, 2014 at 4:54 PM

Re: Disconnect database connection after idle timeout

2014-11-14 Thread Xinhuan Zheng
t;> Date: Thursday, November 13, 2014 at 5:49 PM To: Xinhuan Zheng mailto:xzh...@christianbook.com>> Cc: mod_perl list mailto:modperl@perl.apache.org>> Subject: Re: Disconnect database connection after idle timeout On Thu, Nov 13, 2014 at 5:38 PM, Xinhuan Zheng mailto:xzh...@christianbook.c

Re: Large File Download

2015-03-30 Thread Xinhuan Zheng
Hello, I encountered the large file download before. I recalled that when sendfile directive is turned on httpd.conf, it uses sendfile(2) system call. It is more efficient than combination of read(2) and write(2) since sendfile is operating within the kernel. However, my question is if the large fi

Needs some clarification

2015-10-14 Thread Xinhuan Zheng
Dear mod_perl list, I have been trying to look through the mod_perl documentation to figure out some mod_perl performance issues but I need some clarification on the following: 1. mod_perl as DSO vs statically compiled mod_perl with Apache httpd - other than large memory footprint of the st

Re: Needs some clarification

2015-10-16 Thread Xinhuan Zheng
...@sanger.ac.uk>> Date: Friday, October 16, 2015 at 10:36 AM To: Xinhuan Zheng mailto:xzh...@christianbook.com>> Subject: Re: Needs some clarification 1. cgi-bin scripts vs mod_perl handler - Does cgi-bin scripts get compiled per request or just once? What about those mod_perl handler scrip

mod_perl 2.0.9 make test dumped core

2016-05-10 Thread Xinhuan Zheng
Hello, Today I used mod_perl 2.0.9, apache httpd 2.4.20 and perl 5.10.1 to try compiling mod_perl DSO object on centos 6 (x86_64) machine. It passed configure and make but failed ‘make test’. perl Makefile.PL MP_AP_PREFIX=/usr/local/apache-2.4.20-catalyst make make test The error is written i

mod_perl 1.0 to 2.0 migration

2022-11-21 Thread Xinhuan Zheng
Hi All, We need to migrate our codebase from mod_perl 1.0 to 2.0. In our codebase, we have used “use Apache::Constants”. We want to change it to be like: https://perl.apache.org/docs/2.0/user/porting/compat.html#mod_perl_1_0_and_2_0_Constants_Coexistence. Our codebase are not only used in mod_p