You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Lahiru Gunathilake <la...@wso2.com> on 2008/01/08 07:07:34 UTC

[users@httpd] How to configure httpd process time

I'm using httpd with Apache axis2c.there's a problem with some of httpd
processes when i'm keep on sending requests to the server for two or
three days.I have figure out that there are some  httpd processes which
takes lot of memory and keep on that memory when we are not sending
requests to the server.Then i want to know is there any configuration in
httpd to kill all process time to time and create new once.Is there any
configurations for httpd process time.

Regs
lahiru


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] How to configure httpd process time

Posted by Lahiru Gunathilake <la...@wso2.com>.
Hi Owen,
Yep,Thanks alot..

Regs
lahiru

On Tue, 2008-01-08 at 10:03 +0100, Boyle Owen wrote:
> > -----Original Message-----
> > From: Lahiru Gunathilake [mailto:lahiru@wso2.com] 
> > Sent: Tuesday, January 08, 2008 9:01 AM
> > To: users@httpd.apache.org
> > Subject: RE: [users@httpd] How to configure httpd process time
> > 
> > > 
> > Hi Owen,
> > Thanks for the reply..
> > The problem is exactly when i monitor the httpd using top 
> > what i can see
> > is only one process(httpd process) keep it's memory around 
> > 900MB but the
> > rest keeps less memory.If i can kill that process and keep the rest to
> > proceed it'll great.To do so Is there any configuration with
> > prefork(Something like killing processes when them reach to a 
> > particular
> > memory or any other configuration)please inform me.That'll be 
> > great full
> > to me.I'll read the doc on how to configure prefork mpm.
> 
> There is no core configuration directive that can kill a server when
> it's memory footprint reaches a limit... Maybe there is a third-party
> module that can do this sort of thing (google?), but I wouldn't count on
> it.
> 
> Maybe you're going at this the wrong way - why is one process ballooning
> up to 900MB? Must be the application (CGI, PHP etc.) that it is running
> that has got stuck in loop. So fix the application...
> 
> Rgds,
> Owen Boyle
> Disclaimer: Any disclaimer attached to this message may be ignored. 
> 
> 
> > > > 
> > > > Regs
> > > > lahiru
> > > > 
> > > > 
> > > > 
> > ---------------------------------------------------------------------
> > > > The official User-To-User support forum of the Apache HTTP 
> > > > Server Project.
> > > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > > > For additional commands, e-mail: users-help@httpd.apache.org
> > > >
> > >  
> > > 
> > > This message is for the named person's use only. It may 
> > contain confidential, proprietary or legally privileged 
> > information. If you receive this message in error, please 
> > notify the sender urgently and then immediately delete the 
> > message and any copies of it from your system. Please also 
> > immediately destroy any hardcopies of the message. The 
> > sender's company reserves the right to monitor all e-mail 
> > communications through their networks.
> > > 
> > > 
> > ---------------------------------------------------------------------
> > > The official User-To-User support forum of the Apache HTTP 
> > Server Project.
> > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> > > 
> > 
> > 
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP 
> > Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
>  
> 
> This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. The sender's company reserves the right to monitor all e-mail communications through their networks.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] How to configure httpd process time

Posted by Boyle Owen <Ow...@swx.com>.
> -----Original Message-----
> From: Lahiru Gunathilake [mailto:lahiru@wso2.com] 
> Sent: Tuesday, January 08, 2008 9:01 AM
> To: users@httpd.apache.org
> Subject: RE: [users@httpd] How to configure httpd process time
> 
> > 
> Hi Owen,
> Thanks for the reply..
> The problem is exactly when i monitor the httpd using top 
> what i can see
> is only one process(httpd process) keep it's memory around 
> 900MB but the
> rest keeps less memory.If i can kill that process and keep the rest to
> proceed it'll great.To do so Is there any configuration with
> prefork(Something like killing processes when them reach to a 
> particular
> memory or any other configuration)please inform me.That'll be 
> great full
> to me.I'll read the doc on how to configure prefork mpm.

There is no core configuration directive that can kill a server when
it's memory footprint reaches a limit... Maybe there is a third-party
module that can do this sort of thing (google?), but I wouldn't count on
it.

Maybe you're going at this the wrong way - why is one process ballooning
up to 900MB? Must be the application (CGI, PHP etc.) that it is running
that has got stuck in loop. So fix the application...

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 


> > > 
> > > Regs
> > > lahiru
> > > 
> > > 
> > > 
> ---------------------------------------------------------------------
> > > The official User-To-User support forum of the Apache HTTP 
> > > Server Project.
> > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > > For additional commands, e-mail: users-help@httpd.apache.org
> > >
> >  
> > 
> > This message is for the named person's use only. It may 
> contain confidential, proprietary or legally privileged 
> information. If you receive this message in error, please 
> notify the sender urgently and then immediately delete the 
> message and any copies of it from your system. Please also 
> immediately destroy any hardcopies of the message. The 
> sender's company reserves the right to monitor all e-mail 
> communications through their networks.
> > 
> > 
> ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP 
> Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
 
 
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. The sender's company reserves the right to monitor all e-mail communications through their networks.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] How to configure httpd process time

Posted by Lahiru Gunathilake <la...@wso2.com>.
On Tue, 2008-01-08 at 08:31 +0100, Boyle Owen wrote:
> > -----Original Message-----
> > From: Lahiru Gunathilake [mailto:lahiru@wso2.com] 
> > Sent: Tuesday, January 08, 2008 7:08 AM
> > To: users@httpd.apache.org
> > Subject: [users@httpd] How to configure httpd process time
> > 
> > I'm using httpd with Apache axis2c.there's a problem with 
> > some of httpd
> > processes when i'm keep on sending requests to the server for two or
> > three days.I have figure out that there are some  httpd 
> > processes which
> > takes lot of memory and keep on that memory when we are not sending
> > requests to the server.Then i want to know is there any 
> > configuration in
> > httpd to kill all process time to time and create new once.Is 
> > there any
> > configurations for httpd process time.
> 
> Yes and no. It is quite normal for apache to spawn many httpd processes
> that then sit and wait for requests. If more requests come in, more
> servers will start up (up to a limit). If requests stop coming in,
> processes will die off until they are reduced to a certain limit. This
> is how apache adjusts the resources it uses according to the server
> load.
> 
> Processes are recycled (stopped and restarted), not based on time but
> according to how many requests they have served (see
> MaxRequestsPerChild).
> 
> If you want to tune your server, read
> http://httpd.apache.org/docs/2.2/mod/prefork.html for details on how
> this all works.
> 
> More generally, you shouldn't worry about the memory that apache is
> using when idle. For a start, a lot of the memory is shared so you don't
> simply add up all the footprints from "top". Even if you do, the total
> should still be a small fraction of your computer's memory. If it isn't
> then, your computer is under-resourced and you shouldn't be using it as
> a webserver.
> 
> Rgds,
> Owen Boyle
> Disclaimer: Any disclaimer attached to this message may be ignored. 
> 
> PS: If this isn't what you are asking, post back with a more precise
> question...
> 
Hi Owen,
Thanks for the reply..
The problem is exactly when i monitor the httpd using top what i can see
is only one process(httpd process) keep it's memory around 900MB but the
rest keeps less memory.If i can kill that process and keep the rest to
proceed it'll great.To do so Is there any configuration with
prefork(Something like killing processes when them reach to a particular
memory or any other configuration)please inform me.That'll be great full
to me.I'll read the doc on how to configure prefork mpm.
> > 
> > Regs
> > lahiru
> > 
> > 
> > ---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP 
> > Server Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
>  
> 
> This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. The sender's company reserves the right to monitor all e-mail communications through their networks.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] How to configure httpd process time

Posted by Boyle Owen <Ow...@swx.com>.
> -----Original Message-----
> From: Lahiru Gunathilake [mailto:lahiru@wso2.com] 
> Sent: Tuesday, January 08, 2008 7:08 AM
> To: users@httpd.apache.org
> Subject: [users@httpd] How to configure httpd process time
> 
> I'm using httpd with Apache axis2c.there's a problem with 
> some of httpd
> processes when i'm keep on sending requests to the server for two or
> three days.I have figure out that there are some  httpd 
> processes which
> takes lot of memory and keep on that memory when we are not sending
> requests to the server.Then i want to know is there any 
> configuration in
> httpd to kill all process time to time and create new once.Is 
> there any
> configurations for httpd process time.

Yes and no. It is quite normal for apache to spawn many httpd processes
that then sit and wait for requests. If more requests come in, more
servers will start up (up to a limit). If requests stop coming in,
processes will die off until they are reduced to a certain limit. This
is how apache adjusts the resources it uses according to the server
load.

Processes are recycled (stopped and restarted), not based on time but
according to how many requests they have served (see
MaxRequestsPerChild).

If you want to tune your server, read
http://httpd.apache.org/docs/2.2/mod/prefork.html for details on how
this all works.

More generally, you shouldn't worry about the memory that apache is
using when idle. For a start, a lot of the memory is shared so you don't
simply add up all the footprints from "top". Even if you do, the total
should still be a small fraction of your computer's memory. If it isn't
then, your computer is under-resourced and you shouldn't be using it as
a webserver.

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

PS: If this isn't what you are asking, post back with a more precise
question...

> 
> Regs
> lahiru
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
 
 
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. The sender's company reserves the right to monitor all e-mail communications through their networks.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org