You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Bill Stoddard <bi...@wstoddard.com> on 2001/06/28 22:36:37 UTC
Re: httpd-2.0 tagged (some analysis)
The SIGTERM is coming from the check_pod code. The parent is writing to pod because
idle_thread_count is greater than min_spare_threads. None of the values I am seeing seem
to be related to what's in my config file.
Bill
----- Original Message -----
From: "Cliff Woolley" <cl...@yahoo.com>
To: <ne...@apache.org>
Sent: Thursday, June 28, 2001 4:03 PM
Subject: Re: httpd-2.0 tagged
> On Thu, 28 Jun 2001, William A. Rowe, Jr. wrote:
>
> > > I am having this problem as well. Not sure why. Seems like MPM is eating
> > > itself.
> >
> > On which OS, is this Solaris 8 only?
>
> Confirmed as a problem on both RHL7.1 and Solaris 2.6. prefork seems to
> work fine on both, though.
>
> --Cliff
>
>
> --------------------------------------------------------------
> Cliff Woolley
> cliffwoolley@yahoo.com
> Charlottesville, VA
>
>
>
>
Re: httpd-2.0 tagged (some analysis)
Posted by rb...@covalent.net.
> This loop...
> ************************
> for (i = 0; i < ap_daemons_limit; ++i) {
> /* Initialization to satisfy the compiler. It doesn't know
> * that ap_threads_per_child is always > 0 */
> int status = SERVER_DEAD;
> int any_dying_threads = 0;
> int idle_thread_addition = 0;
>
> if (i >= ap_max_daemons_limit && free_length == idle_spawn_rate)
> break;
> for (j = 0; j < ap_threads_per_child; j++) {
> ws = &ap_scoreboard_image->servers[i][j];
> status = ws->status;
>
> any_dying_threads = any_dying_threads || (status == SERVER_GRACEFUL);
>
> /* We consider a starting server as idle because we started it
> * at least a cycle ago, and if it still hasn't finished starting
> * then we're just going to swamp things worse by forking more.
> * So we hopefully won't need to fork more if we count it.
> * This depends on the ordering of SERVER_READY and SERVER_STARTING.
> */
> if (status <= SERVER_READY) {
> ++idle_thread_addition;
> }
> }
> if (any_dying_threads && free_length < idle_spawn_rate) {
> free_slots[free_length] = i;
> ++free_length;
> }
> if (!any_dying_threads) {
> last_non_dead = i;
> ++total_non_dead;
> idle_thread_count += idle_thread_addition;
> }
> }
> ap_max_daemons_limit = last_non_dead + 1;
>
> if (idle_thread_count > max_spare_threads) {
>
> ************************
>
> results in idle_thrad_count to stablize at ap_max_daemons_limit * ap_threads_per_child,
> which will generally be greater than max_spare_threads which causes the pod write. I don't
> understand you algorithm so I've not figured out how to fix.
>From looking at this, I believe this is easily fixed by just changing that
last line to:
if (idle_thread_count > max_spare_threads * ap_max_daemons_limit) {
But I need to check on that.
Ryan
_____________________________________________________________________________
Ryan Bloom rbb@apache.org
Covalent Technologies rbb@covalent.net
-----------------------------------------------------------------------------
Re: httpd-2.0 tagged (some analysis)
Posted by Bill Stoddard <bi...@wstoddard.com>.
This loop...
************************
for (i = 0; i < ap_daemons_limit; ++i) {
/* Initialization to satisfy the compiler. It doesn't know
* that ap_threads_per_child is always > 0 */
int status = SERVER_DEAD;
int any_dying_threads = 0;
int idle_thread_addition = 0;
if (i >= ap_max_daemons_limit && free_length == idle_spawn_rate)
break;
for (j = 0; j < ap_threads_per_child; j++) {
ws = &ap_scoreboard_image->servers[i][j];
status = ws->status;
any_dying_threads = any_dying_threads || (status == SERVER_GRACEFUL);
/* We consider a starting server as idle because we started it
* at least a cycle ago, and if it still hasn't finished starting
* then we're just going to swamp things worse by forking more.
* So we hopefully won't need to fork more if we count it.
* This depends on the ordering of SERVER_READY and SERVER_STARTING.
*/
if (status <= SERVER_READY) {
++idle_thread_addition;
}
}
if (any_dying_threads && free_length < idle_spawn_rate) {
free_slots[free_length] = i;
++free_length;
}
if (!any_dying_threads) {
last_non_dead = i;
++total_non_dead;
idle_thread_count += idle_thread_addition;
}
}
ap_max_daemons_limit = last_non_dead + 1;
if (idle_thread_count > max_spare_threads) {
************************
results in idle_thrad_count to stablize at ap_max_daemons_limit * ap_threads_per_child,
which will generally be greater than max_spare_threads which causes the pod write. I don't
understand you algorithm so I've not figured out how to fix.
Bill
----- Original Message -----
From: "Bill Stoddard" <bi...@wstoddard.com>
To: <ne...@apache.org>
Sent: Thursday, June 28, 2001 4:36 PM
Subject: Re: httpd-2.0 tagged (some analysis)
> The SIGTERM is coming from the check_pod code. The parent is writing to pod because
> idle_thread_count is greater than min_spare_threads. None of the values I am seeing
seem
> to be related to what's in my config file.
>
> Bill
>
> ----- Original Message -----
> From: "Cliff Woolley" <cl...@yahoo.com>
> To: <ne...@apache.org>
> Sent: Thursday, June 28, 2001 4:03 PM
> Subject: Re: httpd-2.0 tagged
>
>
> > On Thu, 28 Jun 2001, William A. Rowe, Jr. wrote:
> >
> > > > I am having this problem as well. Not sure why. Seems like MPM is eating
> > > > itself.
> > >
> > > On which OS, is this Solaris 8 only?
> >
> > Confirmed as a problem on both RHL7.1 and Solaris 2.6. prefork seems to
> > work fine on both, though.
> >
> > --Cliff
> >
> >
> > --------------------------------------------------------------
> > Cliff Woolley
> > cliffwoolley@yahoo.com
> > Charlottesville, VA
> >
> >
> >
> >
>
Re: httpd-2.0 tagged (some analysis)
Posted by Bill Stoddard <bi...@wstoddard.com>.
Forgot some other relevant info...
idle_thread_count stablizes at 200 (MaxClients * ThreadsPerChild) with this config.
min_spare_threads is 50 (which I think is okay, there is code to bump min_spare_threads to
prevent thrashing).
Bill
> StartServers 3
> MaxClients 8
> MinSpareThreads 25
> MaxSpareThreads 25
> ThreadsPerChild 25
> MaxRequestPerChild 0
>
> >
> > What are your values for the threaded MPM? I am still not seeing this on
> > my server. :-(
> >
> > Ryan
> >
> > On Thu, 28 Jun 2001, Bill Stoddard wrote:
> >
> > > The SIGTERM is coming from the check_pod code. The parent is writing to pod because
> > > idle_thread_count is greater than min_spare_threads. None of the values I am seeing
> seem
> > > to be related to what's in my config file.
> > >
> > > Bill
> > >
> > > ----- Original Message -----
> > > From: "Cliff Woolley" <cl...@yahoo.com>
> > > To: <ne...@apache.org>
> > > Sent: Thursday, June 28, 2001 4:03 PM
> > > Subject: Re: httpd-2.0 tagged
> > >
> > >
> > > > On Thu, 28 Jun 2001, William A. Rowe, Jr. wrote:
> > > >
> > > > > > I am having this problem as well. Not sure why. Seems like MPM is eating
> > > > > > itself.
> > > > >
> > > > > On which OS, is this Solaris 8 only?
> > > >
> > > > Confirmed as a problem on both RHL7.1 and Solaris 2.6. prefork seems to
> > > > work fine on both, though.
> > > >
> > > > --Cliff
> > > >
> > > >
> > > > --------------------------------------------------------------
> > > > Cliff Woolley
> > > > cliffwoolley@yahoo.com
> > > > Charlottesville, VA
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > >
> >
> >
> > _____________________________________________________________________________
> > Ryan Bloom rbb@apache.org
> > Covalent Technologies rbb@covalent.net
> > -----------------------------------------------------------------------------
> >
>
Re: httpd-2.0 tagged (some analysis)
Posted by Bill Stoddard <bi...@wstoddard.com>.
StartServers 3
MaxClients 8
MinSpareThreads 25
MaxSpareThreads 25
ThreadsPerChild 25
MaxRequestPerChild 0
>
> What are your values for the threaded MPM? I am still not seeing this on
> my server. :-(
>
> Ryan
>
> On Thu, 28 Jun 2001, Bill Stoddard wrote:
>
> > The SIGTERM is coming from the check_pod code. The parent is writing to pod because
> > idle_thread_count is greater than min_spare_threads. None of the values I am seeing
seem
> > to be related to what's in my config file.
> >
> > Bill
> >
> > ----- Original Message -----
> > From: "Cliff Woolley" <cl...@yahoo.com>
> > To: <ne...@apache.org>
> > Sent: Thursday, June 28, 2001 4:03 PM
> > Subject: Re: httpd-2.0 tagged
> >
> >
> > > On Thu, 28 Jun 2001, William A. Rowe, Jr. wrote:
> > >
> > > > > I am having this problem as well. Not sure why. Seems like MPM is eating
> > > > > itself.
> > > >
> > > > On which OS, is this Solaris 8 only?
> > >
> > > Confirmed as a problem on both RHL7.1 and Solaris 2.6. prefork seems to
> > > work fine on both, though.
> > >
> > > --Cliff
> > >
> > >
> > > --------------------------------------------------------------
> > > Cliff Woolley
> > > cliffwoolley@yahoo.com
> > > Charlottesville, VA
> > >
> > >
> > >
> > >
> >
> >
> >
>
>
> _____________________________________________________________________________
> Ryan Bloom rbb@apache.org
> Covalent Technologies rbb@covalent.net
> -----------------------------------------------------------------------------
>
Re: httpd-2.0 tagged (some analysis)
Posted by Dale Ghent <da...@elemental.org>.
On Thu, 28 Jun 2001, Cliff Woolley wrote:
| On Thu, 28 Jun 2001 rbb@covalent.net wrote:
|
| > What are your values for the threaded MPM? I am still not seeing this on
| > my server. :-(
|
| Mine is set to this:
|
| <IfModule threaded.c>
| StartServers 3
| MaxClients 8
| MinSpareThreads 5
| MaxSpareThreads 10
| ThreadsPerChild 25
| MaxRequestsPerChild 0
| </IfModule>
|
|
| I believe that's the default...
That is, and I saw it with StartServers=3. After I saw the problem of all
but one child dying, I upped it to 5 (and still left the other values at
default) and still saw the behaviour. 5 childs would then start, and 4
would SIGTERM.
The remaining child would allow connections, but fail to serve request
(lost mutex lock?)
/dale
Re: httpd-2.0 tagged (some analysis)
Posted by Cliff Woolley <cl...@yahoo.com>.
On Thu, 28 Jun 2001 rbb@covalent.net wrote:
> What are your values for the threaded MPM? I am still not seeing this on
> my server. :-(
Mine is set to this:
<IfModule threaded.c>
StartServers 3
MaxClients 8
MinSpareThreads 5
MaxSpareThreads 10
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
I believe that's the default...
--Cliff
--------------------------------------------------------------
Cliff Woolley
cliffwoolley@yahoo.com
Charlottesville, VA
Re: httpd-2.0 tagged (some analysis)
Posted by rb...@covalent.net.
What are your values for the threaded MPM? I am still not seeing this on
my server. :-(
Ryan
On Thu, 28 Jun 2001, Bill Stoddard wrote:
> The SIGTERM is coming from the check_pod code. The parent is writing to pod because
> idle_thread_count is greater than min_spare_threads. None of the values I am seeing seem
> to be related to what's in my config file.
>
> Bill
>
> ----- Original Message -----
> From: "Cliff Woolley" <cl...@yahoo.com>
> To: <ne...@apache.org>
> Sent: Thursday, June 28, 2001 4:03 PM
> Subject: Re: httpd-2.0 tagged
>
>
> > On Thu, 28 Jun 2001, William A. Rowe, Jr. wrote:
> >
> > > > I am having this problem as well. Not sure why. Seems like MPM is eating
> > > > itself.
> > >
> > > On which OS, is this Solaris 8 only?
> >
> > Confirmed as a problem on both RHL7.1 and Solaris 2.6. prefork seems to
> > work fine on both, though.
> >
> > --Cliff
> >
> >
> > --------------------------------------------------------------
> > Cliff Woolley
> > cliffwoolley@yahoo.com
> > Charlottesville, VA
> >
> >
> >
> >
>
>
>
_____________________________________________________________________________
Ryan Bloom rbb@apache.org
Covalent Technologies rbb@covalent.net
-----------------------------------------------------------------------------
Re: httpd-2.0 tagged (some analysis)
Posted by rb...@covalent.net.
I am seeing this when using the tree I tagged from CVS last night, but I
am not seeing it with my development tree. Unfortunately, my dev tree is
not showing any diffs when compared to the CVS tree. :-( Still looking
into it, but I won't have an answer until later tonight.
Ryan
On Thu, 28 Jun 2001, Bill Stoddard wrote:
> The SIGTERM is coming from the check_pod code. The parent is writing to pod because
> idle_thread_count is greater than min_spare_threads. None of the values I am seeing seem
> to be related to what's in my config file.
>
> Bill
>
> ----- Original Message -----
> From: "Cliff Woolley" <cl...@yahoo.com>
> To: <ne...@apache.org>
> Sent: Thursday, June 28, 2001 4:03 PM
> Subject: Re: httpd-2.0 tagged
>
>
> > On Thu, 28 Jun 2001, William A. Rowe, Jr. wrote:
> >
> > > > I am having this problem as well. Not sure why. Seems like MPM is eating
> > > > itself.
> > >
> > > On which OS, is this Solaris 8 only?
> >
> > Confirmed as a problem on both RHL7.1 and Solaris 2.6. prefork seems to
> > work fine on both, though.
> >
> > --Cliff
> >
> >
> > --------------------------------------------------------------
> > Cliff Woolley
> > cliffwoolley@yahoo.com
> > Charlottesville, VA
> >
> >
> >
> >
>
>
>
_____________________________________________________________________________
Ryan Bloom rbb@apache.org
Covalent Technologies rbb@covalent.net
-----------------------------------------------------------------------------