On Thu, 13 Nov 2014 10:43:35 -0500
Perrin Harkins wrote:
> Apache::DBI should also re-connect with no problems if a request comes in
> after a connection has timed out. If that isn't happening, make sure you
> are using Apache::DBI properly.
>
Hi Perrin,
Nobody suggested using connect_cached,
On 11/13/2014 09:42 AM, Perrin Harkins wrote:
On Thu, Nov 13, 2014 at 11:29 AM, Dr James Smith mailto:j...@sanger.ac.uk>> wrote:
From experience - and having chatted with our DBAs at work, with modern
Oracle and with MySQL keeping persistent connections around is no real gain and
usually
r 12, 2014 at 11:53 PM
To: Xinhuan Zheng mailto:xzh...@christianbook.com>>, modperl
mailto:modperl@perl.apache.org>>
Subject: Re: Disconnect database connection after idle timeout
I don't fully understand your need here. I'm going to give my best.
You could set an alarm
On Fri, Nov 14, 2014 at 1:32 PM, Xinhuan Zheng
wrote:
> Are you implying that the performance will be suffered when using
> mod_perl-enabled server processes as the front tier servers?
Not performance, scalability. You can't handle as many requests per second
if you use mod_perl without a front
On Fri, 14 Nov 2014 08:30:18 -0500
Perrin Harkins wrote:
> If you ever switch off AutoCommit in
> your code, I'd suggest adding a cleanup handler that checks if the handle
> is not currently in AutoCommit mode, and if not, issues a rollback and
> switches it to AutoCommit. That protects against a
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
On Fri, Nov 14, 2014 at 7:58 AM, Vincent Veyron wrote:
> If I understand correctly, I could also use Apache::DBI and a persistent
> connection for a similar result, modulo what you wrote in an earlier
> message regarding the connection being more explicit (which I don't quite
> grasp, I'll have t
On Thu, 13 Nov 2014 17:40:05 -0500
Perrin Harkins wrote:
>
> No, that's perfect. Since pnotes gets cleaned up at the end of every
> request, there's no danger of the handle sticking around. I assume you're
> calling DBI->connect() to get the handle in the HeaderParser phase, and
> using Apache::
On Thu, Nov 13, 2014 at 5:38 PM, Xinhuan Zheng
wrote:
> We have load balancer cache that can cache images and JavaScripts. This
> functions seems a bit duplicate.
It's not about caching. Here's a quote from that link I sent earlier:
"Another drawback of this approach is that when serving outpu
On Thu, Nov 13, 2014 at 5:29 PM, Vincent Veyron wrote:
> I stash a reference to a DBI handle in pnotes during the HeaderParser
> phase of my requests; I then refer to this handle for every request in my
> PerlResponseHandlers.
>
> This seems to have been working fine for several months. Am I doin
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 2:41 PM, Xinhuan Zheng
mailto:xzh...@christianbook.com>> wrote:
>From the description of the
On Thu, 13 Nov 2014 16:35:59 -0500
Perrin Harkins wrote:
>
> Keep in mind, neither of these work unless you call
> DBI->connect()/connect_cached() at the beginning of every request. You
> can't just keep a DBI handle stashed somewhere and expect that to work.
>
h... you're having me worrie
On Thu, Nov 13, 2014 at 2:41 PM, Xinhuan Zheng
wrote:
> From the description of the document, the “proxy” server acts much like a
> memcache but it appears the difference is the “proxy” understands the HTTP
> protocol while memcache does not.
Not exactly. While it is possible to do some caching
On Thu, Nov 13, 2014 at 2:48 PM, Vincent Veyron wrote:
> But then, what is the point of using connect_cached?
You can use it outside of mod_perl. You can also use instead of Apache::DBI
if you don't want the connection to be more explicit (instead of magically
overriding the connect() call).
K
On Thu, 13 Nov 2014 12:45:09 -0500
Perrin Harkins wrote:
> Well, Apache::DBI should already be doing a ping and a successful
> re-connect if needed.
Haha, thanks for your answer. I have so much to learn...
But then, what is the point of using connect_cached?
--
HTTP request?
Thanks,
- xinhuan
From: Perrin Harkins mailto:phark...@gmail.com>>
Date: Thursday, November 13, 2014 at 12:50 PM
To: Xinhuan Zheng mailto:xzh...@christianbook.com>>
Cc: Dr James Smith mailto:j...@sanger.ac.uk>>, mod_perl list
mailto:modperl@perl.apache.org>>
gt; 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
>>> Date: Thursday, Novembe
r 13, 2014 at 12:50 PM
>> To: Xinhuan Zheng
>> Cc: Dr James Smith , mod_perl list <
>> modperl@perl.apache.org>
>> Subject: Re: Disconnect database connection after idle timeout
>>
>>On Thu, Nov 13, 2014 at 12:19 PM, Xinhuan Zheng <
>> xzh...@c
Perrin Harkins
> Date: Thursday, November 13, 2014 at 12:50 PM
> To: Xinhuan Zheng
> Cc: Dr James Smith , mod_perl list <
> modperl@perl.apache.org>
> Subject: Re: Disconnect database connection after idle timeout
>
>On Thu, Nov 13, 2014 at 12:19 PM, Xinhuan Zheng &l
to:xzh...@christianbook.com>>
Cc: Dr James Smith mailto:j...@sanger.ac.uk>>, mod_perl list
mailto:modperl@perl.apache.org>>
Subject: Re: Disconnect database connection after idle timeout
On Thu, Nov 13, 2014 at 12:19 PM, Xinhuan Zheng
mailto:xzh...@christianbook.com>> wrote:
On Thu, Nov 13, 2014 at 12:19 PM, Xinhuan Zheng
wrote:
> Having another tier (like DBD::Gofer) looks like really messy in
> infrastructure plus it’s not certain who is going to maintain that module’s
> quality.
I'd only recommend trying it after you set up a front-end proxy, tune your
mod_perl
On Thu, Nov 13, 2014 at 12:21 PM, Vincent Veyron
wrote:
> Nobody suggested using connect_cached, where the documentations says :
>
> The cached database handle is replaced with a new
>connection if it has been disconnected or if the "ping" method fails
>
> Would that not solve OP's proble
On Thu, 13 Nov 2014 10:43:35 -0500
Perrin Harkins wrote:
> Apache::DBI should also re-connect with no problems if a request comes in
> after a connection has timed out. If that isn't happening, make sure you
> are using Apache::DBI properly.
>
Hi Perrin,
Nobody suggested using connect_cached,
t;>
Subject: Re: Disconnect database connection after idle timeout
On Thu, Nov 13, 2014 at 11:29 AM, Dr James Smith
mailto:j...@sanger.ac.uk>> wrote:
>From experience - and having chatted with our DBAs at work, with modern Oracle
>and with MySQL keeping persistent connections around is n
On Thu, Nov 13, 2014 at 11:29 AM, Dr James Smith wrote:
> From experience - and having chatted with our DBAs at work, with modern
> Oracle and with MySQL keeping persistent connections around is no real gain
> and usually lots of risks
It's certainly good to know how long it takes to get a fres
On 13/11/2014 15:43, Perrin Harkins wrote:
On Thu, Nov 13, 2014 at 10:29 AM, Xinhuan Zheng
mailto:xzh...@christianbook.com>> wrote:
We don’t have any front end proxy.
I think I see the problem... ;)
If you use a front-end proxy so that your mod_perl servers are only
handling mod_perl re
On Thu, Nov 13, 2014 at 10:29 AM, Xinhuan Zheng
wrote:
> We don’t have any front end proxy.
I think I see the problem... ;)
If you use a front-end proxy so that your mod_perl servers are only
handling mod_perl requests, and tune your configuration so that idle
mod_perl servers don't sit around
o 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.org>>
Subject: Re: Disconnect database connection after idle timeout
I don&
y. Would it be possible to implement that? Or is it too hard
>> to implement?
>>
>> - xinhuan
>>
>> From: Paul Silevitch
>> Date: Wednesday, November 12, 2014 at 11:53 PM
>> To: Xinhuan Zheng , modperl <
>> modperl@perl.apache.org>
>> Subj
? Or is it too hard
> to implement?
>
> - xinhuan
>
> From: Paul Silevitch
> Date: Wednesday, November 12, 2014 at 11:53 PM
> To: Xinhuan Zheng , modperl <
> modperl@perl.apache.org>
> Subject: Re: Disconnect database connection after idle timeout
>
> I don
rg>>
Subject: Re: Disconnect database connection after idle timeout
I don't fully understand your need here. I'm going to give my best.
You could set an alarm in the cleanup handler that calls the disconnect after a
specified amount of time. If a new request comes in, you
I don't fully understand your need here. I'm going to give my best.
You could set an alarm in the cleanup handler that calls the disconnect
after a specified amount of time. If a new request comes in, you could
cancel the alarm in a postreadrequest handler (or something early in the
cycle). To
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
33 matches
Mail list logo