Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

mod-perl child process

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


Raja.Kulasekaran at netapp

Oct 27, 2009, 5:33 AM

Post #1 of 7 (152 views)
Permalink
mod-perl child process

Hi,

I have configured the mod_perl with oracle persistent connection through Apache::DBI module. On every web page request It creates a process
something like below and It never be killed automatically when the request has completed.

Can you please suggest me how to do I handle this scenario ?.

oracle 8021 1 0 17:51 ? 00:00:01 oracleXE (LOCAL=NO)
oracle 8038 1 0 17:51 ? 00:00:00 oracleXE (LOCAL=NO)
oracle 8050 1 0 17:51 ? 00:00:01 oracleXE (LOCAL=NO)
oracle 8068 1 0 17:52 ? 00:00:00 oracleXE (LOCAL=NO)

Thanks,
Raja



-----Original Message-----
From: André Warnier [mailto:aw[at]ice-sa.com]
Sent: Monday, October 26, 2009 3:17 AM
To: modperl[at]perl.apache.org
Subject: Re: Server hangs after 502 request

Rolf Schaufelberger wrote:
...

> Of course, but what I meant was, can I tell LWP to pass the same
> referer string I found in my logfile, to simultate exactly that request ?
>
I'm sure you can. That "referrer" is just a HTTP header ("Referer:"
with only one r I think), and LWP allows you to add headers to the request.
lwp-request -h

I doubt this will help you however. If you examine your access log, you
probably have lots of such kinds of request, which do not necessarily
bring down your server.

Maybe an easier way :
- on one of your servers (suppose it is called
"yourserver.yourcompany.com"), create a really long path under the
document root and put a html page in it.
Like :
/var/www/htdocs/some/very/long/path/to/a/document/page.html
- in that html page, put a link to your front-end server
- call up that page in a browser, and click on the link.
- then look in your access log

The browser, when you click on the link in the page, sends a request to
your front-end server.
In that request, it will add a header :
Referer:
http://yourserver.yourcompany.com/some/very/long/path/to/a/document/page.html

That's what you see in the log.


pharkins at gmail

Oct 27, 2009, 11:17 AM

Post #2 of 7 (139 views)
Permalink
Re: mod-perl child process [In reply to]

On Tue, Oct 27, 2009 at 8:33 AM, Kulasekaran, Raja
<Raja.Kulasekaran[at]netapp.com> wrote:
> I have configured the mod_perl with oracle persistent connection through Apache::DBI module. On every web page request It creates a process
> something like below and It never be killed automatically when the request has completed.

That is the intended behavior. You should get one Oracle connection
for each apache child process. They will stay connected for the life
of the process.

- Perrin


Raja.Kulasekaran at netapp

Oct 27, 2009, 9:32 PM

Post #3 of 7 (136 views)
Permalink
RE: mod-perl child process [In reply to]

So, How to I control this ?. Is it possible to reuse the existing
connection ?.

Raja

-----Original Message-----
From: Perrin Harkins [mailto:pharkins[at]gmail.com]
Sent: Tuesday, October 27, 2009 11:47 PM
To: Kulasekaran, Raja
Cc: mod_perl list
Subject: Re: mod-perl child process

On Tue, Oct 27, 2009 at 8:33 AM, Kulasekaran, Raja
<Raja.Kulasekaran[at]netapp.com> wrote:
> I have configured the mod_perl with oracle persistent connection
through Apache::DBI module. On every web page request It creates a
process
> something like below and It never be killed automatically when the
request has completed.

That is the intended behavior. You should get one Oracle connection
for each apache child process. They will stay connected for the life
of the process.

- Perrin


pharkins at gmail

Oct 28, 2009, 9:02 AM

Post #4 of 7 (132 views)
Permalink
Re: mod-perl child process [In reply to]

On Wed, Oct 28, 2009 at 12:32 AM, Kulasekaran, Raja
<Raja.Kulasekaran[at]netapp.com> wrote:
> So, How to I control this ?. Is it possible to reuse the existing
> connection ?.

It should be doing that already. Each process will open one
connection and keep it open (unless you use different connection
parameters, like a different login), reusing it each time. What you
can't do is share a single connection between multiple processes.

If the number of connections to Oracle is a problem for you, there are
several tools out there that can help. You'll find discussion of them
in the mailing list archives. The first thing to do is make sure you
have a proxy in front of your mod_perl server.

- Perrin


Raja.Kulasekaran at netapp

Oct 29, 2009, 7:05 AM

Post #5 of 7 (130 views)
Permalink
RE: mod-perl child process [In reply to]

Hi,

The below method used to kill the child process after the successful
execution of web request.

$r->child_terminate();

How do I get the status that particular child process has been killed ?.
Any suggestion on this ?

Raja

-----Original Message-----
From: Kulasekaran, Raja
Sent: Wednesday, October 28, 2009 10:02 AM
To: Perrin Harkins
Cc: mod_perl list
Subject: RE: mod-perl child process


So, How to I control this ?. Is it possible to reuse the existing
connection ?.

Raja

-----Original Message-----
From: Perrin Harkins [mailto:pharkins[at]gmail.com]
Sent: Tuesday, October 27, 2009 11:47 PM
To: Kulasekaran, Raja
Cc: mod_perl list
Subject: Re: mod-perl child process

On Tue, Oct 27, 2009 at 8:33 AM, Kulasekaran, Raja
<Raja.Kulasekaran[at]netapp.com> wrote:
> I have configured the mod_perl with oracle persistent connection
through Apache::DBI module. On every web page request It creates a
process
> something like below and It never be killed automatically when the
request has completed.

That is the intended behavior. You should get one Oracle connection
for each apache child process. They will stay connected for the life
of the process.

- Perrin


pharkins at gmail

Oct 29, 2009, 7:48 AM

Post #6 of 7 (131 views)
Permalink
Re: mod-perl child process [In reply to]

On Thu, Oct 29, 2009 at 10:05 AM, Kulasekaran, Raja
<Raja.Kulasekaran[at]netapp.com> wrote:
> How do I get the status that particular child process has been killed ?

Are you talking about the exit status of the process? You can't get
that. What are you trying to do?

- Perrin


savirn at hotmail

Oct 30, 2009, 11:52 AM

Post #7 of 7 (127 views)
Permalink
RE: mod-perl child process [In reply to]

remove my email from list.

Thanks and regards,
Sudhakar Avirneni,
ph)6786228961



> Date: Thu, 29 Oct 2009 10:48:05 -0400
> Subject: Re: mod-perl child process
> From: pharkins[at]gmail.com
> To: Raja.Kulasekaran[at]netapp.com
> CC: modperl[at]perl.apache.org
>
> On Thu, Oct 29, 2009 at 10:05 AM, Kulasekaran, Raja
> <Raja.Kulasekaran[at]netapp.com> wrote:
> > How do I get the status that particular child process has been killed ?
>
> Are you talking about the exit status of the process? You can't get
> that. What are you trying to do?
>
> - Perrin

_________________________________________________________________
New Windows 7: Simplify what you do everyday. Find the right PC for you.
http://windows.microsoft.com/shop

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.