You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by Doug MacEachern <do...@covalent.net> on 2002/06/03 20:15:05 UTC

Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm

this change is wrong.  please revert and explain what you need so we can 
find the right solution.

On 3 Jun 2002 jerenkrantz@apache.org wrote:

> jerenkrantz    2002/06/03 11:03:42
> 
>   Modified:    perl-framework/Apache-Test/lib/Apache TestConfig.pm
>   Log:
>   Only start one server instance until we need the other one for the proxy
>   tests.
>   
>   Revision  Changes    Path
>   1.137     +1 -1      httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm
>   
>   Index: TestConfig.pm
>   ===================================================================
>   RCS file: /home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestConfig.pm,v
>   retrieving revision 1.136
>   retrieving revision 1.137
>   diff -u -r1.136 -r1.137
>   --- TestConfig.pm	20 May 2002 22:25:34 -0000	1.136
>   +++ TestConfig.pm	3 Jun 2002 18:03:42 -0000	1.137
>   @@ -1553,7 +1553,7 @@
>    </IfModule>
>    
>    <IfModule prefork.c>
>   -    StartServers         @MaxClients@
>   +    StartServers         1
>        MaxClients           @MaxClients@
>        MaxRequestsPerChild  0
>    </IfModule>
>   
>   
>   
> 


Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm

Posted by Doug MacEachern <do...@covalent.net>.
On Mon, 3 Jun 2002, Justin Erenkrantz wrote:
 
> Um, I think you misread my commit.  All I changed was StartServers.

totally, i only read - @MaxClients@ + 1, never even saw StartServers.
disregard my comments, they were meant for MaxClients, your change is 
fine with me.


Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm

Posted by Justin Erenkrantz <je...@apache.org>.
On Mon, Jun 03, 2002 at 11:31:54AM -0700, Doug MacEachern wrote:
> On Mon, 3 Jun 2002, Justin Erenkrantz wrote:
>  
> > The reason I don't like that is because if I need to restart the
> > server I have to quit my gdb.  I want my gdb to last longer than
> > the process (so my breakpoints et al remain the same).
> 
> you can use the -maxclients option or edit httpd.conf by hand before you 
> start to debug.
>  
> > I'm confused why this commit is an issue.  None of the other MPMs
> > start multiple processes - why should prefork?
> 
> it breaks any sort of proxy tests, various modperl test, etc.
> your change is just plain wrong, back it out.

> 
> >  And, it's not like
> > it won't start multiple processes when it needs to.  -- justin
> 
> umm, not with "MaxClients 1" it won't

Um, I think you misread my commit.  All I changed was StartServers.

<IfModule prefork.c>
    StartServers         1
    MaxClients           @MaxClients@
    MaxRequestsPerChild  0
</IfModule>

MaxClients remained the same.  

In fact, I think it should be:

<IfModule prefork.c>
    StartServers         1
    MinSpareServers      1
    MaxSpareServers      1
    MaxClients           @MaxClients@
    MaxRequestsPerChild  0
</IfModule>

Now, Aaron mentioned that perhaps we should always run with multiple
processes regardless of the MPMs.  I could agree with that.  But,
what we had was inconsistent.  -- justin

Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm

Posted by Doug MacEachern <do...@covalent.net>.
On Mon, 3 Jun 2002, Justin Erenkrantz wrote:
 
> Um, as I pointed out, none of the other MPMs are configured like
> this.  Only prefork would start multiple servers.  The others
> always run under a single process.  -- justin

yeah, cos threaded mpms can handle concurrent requests with one 
process, prefork cannot. 


Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm

Posted by Justin Erenkrantz <je...@apache.org>.
On Mon, Jun 03, 2002 at 11:34:39AM -0700, Aaron Bannert wrote:
> Not that I'm that experienced with the perl-framework over here,
> it would seem to me that it's important to run the tests under
> typical environments (ie multiple processes). Imagine a deadlocking
> bug that we never hit in -X mode.

Um, as I pointed out, none of the other MPMs are configured like
this.  Only prefork would start multiple servers.  The others
always run under a single process.  -- justin

Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm

Posted by Aaron Bannert <aa...@clove.org>.
> The reason I don't like that is because if I need to restart the
> server I have to quit my gdb.  I want my gdb to last longer than
> the process (so my breakpoints et al remain the same).
> 
> I'm confused why this commit is an issue.  None of the other MPMs
> start multiple processes - why should prefork?  And, it's not like
> it won't start multiple processes when it needs to.  -- justin

Not that I'm that experienced with the perl-framework over here,
it would seem to me that it's important to run the tests under
typical environments (ie multiple processes). Imagine a deadlocking
bug that we never hit in -X mode.

just my 2c,
-aaron

Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm

Posted by Doug MacEachern <do...@covalent.net>.
On Mon, 3 Jun 2002, Doug MacEachern wrote:
 
> umm, not with "MaxClients 1" it won't

oh wait, you changed StartServers not MaxClients, maybe that isn't a 
problem. 


Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm

Posted by Doug MacEachern <do...@covalent.net>.
On Mon, 3 Jun 2002, Justin Erenkrantz wrote:
 
> The reason I don't like that is because if I need to restart the
> server I have to quit my gdb.  I want my gdb to last longer than
> the process (so my breakpoints et al remain the same).

you can use the -maxclients option or edit httpd.conf by hand before you 
start to debug.
 
> I'm confused why this commit is an issue.  None of the other MPMs
> start multiple processes - why should prefork?

it breaks any sort of proxy tests, various modperl test, etc.
your change is just plain wrong, back it out.

>  And, it's not like
> it won't start multiple processes when it needs to.  -- justin

umm, not with "MaxClients 1" it won't


Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm

Posted by Stas Bekman <st...@stason.org>.
On Mon, 3 Jun 2002, Justin Erenkrantz wrote:

> On Mon, Jun 03, 2002 at 11:21:57AM -0700, Doug MacEachern wrote:
> > On Mon, 3 Jun 2002, Aaron Bannert wrote:
> >  
> > > Cliff is always mentioning something like t/TEST -d gdb or something
> > > like that. Won't that run in -X mode automatically?
> 
> The reason I don't like that is because if I need to restart the
> server I have to quit my gdb.  I want my gdb to last longer than
> the process (so my breakpoints et al remain the same).

you can store the bps in the gdb startup script if you like. e.g. I've 
documented this "idea" here:
http://perl.apache.org/release/docs/2.0/devel/debug_c/debug_c.html#Precooked_gdb_Startup_Scripts


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org 
mailto:stas@stason.org http://use.perl.org http://apacheweek.com  
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm

Posted by Justin Erenkrantz <je...@apache.org>.
On Mon, Jun 03, 2002 at 11:21:57AM -0700, Doug MacEachern wrote:
> On Mon, 3 Jun 2002, Aaron Bannert wrote:
>  
> > Cliff is always mentioning something like t/TEST -d gdb or something
> > like that. Won't that run in -X mode automatically?

The reason I don't like that is because if I need to restart the
server I have to quit my gdb.  I want my gdb to last longer than
the process (so my breakpoints et al remain the same).

I'm confused why this commit is an issue.  None of the other MPMs
start multiple processes - why should prefork?  And, it's not like
it won't start multiple processes when it needs to.  -- justin

Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm

Posted by Doug MacEachern <do...@covalent.net>.
On Mon, 3 Jun 2002, Aaron Bannert wrote:
 
> Cliff is always mentioning something like t/TEST -d gdb or something
> like that. Won't that run in -X mode automatically?

yes.


Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm

Posted by Cliff Woolley <jw...@virginia.edu>.
On Mon, 3 Jun 2002, Aaron Bannert wrote:

> Cliff is always mentioning something like t/TEST -d gdb or something
> like that. Won't that run in -X mode automatically?

Yeah, that works quite well.  Have two consoles open, run t/TEST -d gdb in
one of them (which automatically runs in -X mode and attaches to the
correct pid, as long as you're running prefork that is).  In the other,
just do t/TEST -run or telnet localhost 8529 or whatever.

--Cliff


Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm

Posted by Aaron Bannert <aa...@clove.org>.
On Mon, Jun 03, 2002 at 11:24:52AM -0700, Justin Erenkrantz wrote:
> On Mon, Jun 03, 2002 at 11:15:05AM -0700, Doug MacEachern wrote:
> > this change is wrong.  please revert and explain what you need so we can 
> > find the right solution.
> 
> With prefork, it starts up 2 instances.  I only want it to have one
> instance so I can attach to the right process with gdb.  It's
> annoying to have to get the wrong process 50% of the time.  (The
> other MPMs don't suffer from this since they only have one process.)
> 
> I figured out that it needs {Max|Min}SpareServers set too.  -- justin

Cliff is always mentioning something like t/TEST -d gdb or something
like that. Won't that run in -X mode automatically?

-aaron

Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfig.pm

Posted by Justin Erenkrantz <je...@apache.org>.
On Mon, Jun 03, 2002 at 11:15:05AM -0700, Doug MacEachern wrote:
> this change is wrong.  please revert and explain what you need so we can 
> find the right solution.

With prefork, it starts up 2 instances.  I only want it to have one
instance so I can attach to the right process with gdb.  It's
annoying to have to get the wrong process 50% of the time.  (The
other MPMs don't suffer from this since they only have one process.)

I figured out that it needs {Max|Min}SpareServers set too.  -- justin