Re: Disconnect database connection after idle timeout

Xinhuan Zheng <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <D08BB458.7D31E%[email protected]>
Hi Parrin,

> the huge mod_perl-enabled server process (with all of its system resources) will be tied up until the response is completely written to the client. While it might take a few milliseconds for your script to complete the request, there is a chance it will be still busy for some number of seconds or even minutes if the request is from a slow connection client.

Are you implying that the performance will be suffered when using mod_perl-enabled server processes as the front tier servers?

- xinhuan

From: Perrin Harkins <[email protected]<mailto:[email protected]>>
Date: Thursday, November 13, 2014 at 5:49 PM
To: Xinhuan Zheng <[email protected]<mailto:[email protected]>>
Cc: mod_perl list <[email protected]<mailto:[email protected]>>
Subject: Re: Disconnect database connection after idle timeout

On Thu, Nov 13, 2014 at 5:38 PM, Xinhuan Zheng <[email protected]<mailto:[email protected]>> 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 output to a client with a slow connection, the huge mod_perl-enabled server process (with all of its system resources) will be tied up until the response is completely written to the client. While it might take a few milliseconds for your script to complete the request, there is a chance it will be still busy for some number of seconds or even minutes if the request is from a slow connection client."

You might think everyone has fast connections now so this won't matter, but it does. It's especially bad if you have keep-alive on for the apache server running mod_perl, since that means your large mod_perl processes sit around for some extra time doing nothing, while holding onto their database connections. Install a front-end proxy, turn off keep-alive  on your mod_perl and reduce your max idle servers, and watch what happens.

- Perrin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.