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

Mailing List Archive: ModPerl: ModPerl

"Free to wrong pool" error in Apache logs under high load

 

 

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


scott.tomilson at gmail

Oct 9, 2008, 12:07 AM

Post #1 of 8 (856 views)
Permalink
"Free to wrong pool" error in Apache logs under high load

Hi all,

Apologies if this isn't the right forum, but I am not sure where to turn
to...

I have mod_perl 2.0.4 installed with ActivePerl 5.10.0 under Apache 2.2.9
running on Windows 2003 Server SP1.

I have a very simple PerlResponseHandler hooked in via httpd.conf for a
specific Location. My custom PerlResponseHandler simply prints back "Hello
World" on the HTTP Response. E.g. (simplified obviously):

sub handler {
my $r = shift;
my $s = $r->server;
print "Hello World";
return Apache2::Const::OK;
}
1;

The PerlResponseHandler works fine for most requests, however if I blast a
whole bunch of HTTP requests on multiple threads, etc to Apache, the Web
server stops handling responses. Connections eventually time out with no
response. Apache error.log shows the following:

Free to wrong pool da2750 not 184a6a8.

Which leads me to believe there is something funny going on with multiple
threads, etc.

Where do I start to dive in and figure this out? I don't think I am doing
anything out of the ordinary - it is pretty basic stuff. I am concerned my
version of mod_perl or ActivePerl has some issues around this...

Any tips greatly appreciated!

Thanks,
Scott


aw at ice-sa

Oct 9, 2008, 1:03 AM

Post #2 of 8 (818 views)
Permalink
Re: "Free to wrong pool" error in Apache logs under high load [In reply to]

Scott Tomilson wrote:
> Hi all,
>
> Apologies if this isn't the right forum, but I am not sure where to turn
> to...
>
> I have mod_perl 2.0.4 installed with ActivePerl 5.10.0 under Apache 2.2.9
> running on Windows 2003 Server SP1.
Well, that sounds like you are in the right forum anyway..

>
> I have a very simple PerlResponseHandler
and that even more.. Welcome !

hooked in via httpd.conf for a
> specific Location. My custom PerlResponseHandler simply prints back "Hello
> World" on the HTTP Response. E.g. (simplified obviously):
>
> sub handler {
> my $r = shift;
> my $s = $r->server;

are you using that $s later ? seems useless otherwise

> print "Hello World";

my $count = $r->print "Hello World"; # ?
I'm not sure it makes that much difference, but it would seem more
consistent to use in this environment.
http://perl.apache.org/docs/2.0/api/Apache2/RequestIO.html#C_print_

> return Apache2::Const::OK;
> }
> 1;
>
> The PerlResponseHandler works fine for most requests, however if I blast a
> whole bunch of HTTP requests on multiple threads, etc to Apache, the Web
> server stops handling responses. Connections eventually time out with no
> response. Apache error.log shows the following:
>
> Free to wrong pool da2750 not 184a6a8.
>
> Which leads me to believe there is something funny going on with multiple
> threads, etc.
>
It definitely sounds that way, but that's way out of my league.
(Might that extra $r->server have something to do with it ?)

Perrin, Fred, Torsten ? help !


torsten.foertsch at gmx

Oct 9, 2008, 2:26 AM

Post #3 of 8 (808 views)
Permalink
Re: "Free to wrong pool" error in Apache logs under high load [In reply to]

On Thu 09 Oct 2008, André Warnier wrote:
> > The PerlResponseHandler works fine for most requests, however if I
> > blast a whole bunch of HTTP requests on multiple threads, etc to
> > Apache, the Web server stops handling responses.  Connections
> > eventually time out with no response.  Apache error.log shows the
> > following:
> >
> > Free to wrong pool da2750 not 184a6a8.
> >
> > Which leads me to believe there is something funny going on with
> > multiple threads, etc.
>
> It definitely sounds that way, but that's way out of my league.
> (Might that extra $r->server have something to do with it ?)
>
> Perrin, Fred, Torsten ? help !

Sorry guys, I have read my name at least twice in similar mails lately.
But I must say I am under heavy load with my daytime job and this will
continue almost certainly till the end of the year. Plus my father had
a heart attack a week ago. (3 bypasses but he will survive.) So, I am
afraid, I am not going to be much help.

Torsten

--
Need professional mod_perl support?
Just hire me: torsten.foertsch [at] gmx


perrin at elem

Oct 9, 2008, 8:03 AM

Post #4 of 8 (791 views)
Permalink
Re: "Free to wrong pool" error in Apache logs under high load [In reply to]

On Thu, Oct 9, 2008 at 3:07 AM, Scott Tomilson <scott.tomilson [at] gmail> wrote:
> Free to wrong pool da2750 not 184a6a8.
>
> Which leads me to believe there is something funny going on with multiple
> threads, etc.

In the past these have typically been threading problems. I don't run
Windows or threads, so I'm probably not going to be much help to you
on this, but if you're not using a build you got from perl.apache.org
I would consider trying that first. Are you loading any other
modules, or just running this one simple test?

- Perrin


scott.tomilson at gmail

Oct 9, 2008, 5:02 PM

Post #5 of 8 (790 views)
Permalink
Re: "Free to wrong pool" error in Apache logs under high load [In reply to]

Thanks Perrin.

I am running a build of mod_perl I got via perl.apache.org, yes (or I think
probably linked to uwinnipeg?). No other modules than the standard ones,
plus the standard ActivePerl download from ActiveState. We actually tried
the same solution on Solaris and it worked fine. It does seem specific to
Windows itself - or more likely ActivePerl on Windows...

Cheers,
Scott

On Fri, Oct 10, 2008 at 12:03 AM, Perrin Harkins <perrin [at] elem> wrote:

> On Thu, Oct 9, 2008 at 3:07 AM, Scott Tomilson <scott.tomilson [at] gmail>
> wrote:
> > Free to wrong pool da2750 not 184a6a8.
> >
> > Which leads me to believe there is something funny going on with multiple
> > threads, etc.
>
> In the past these have typically been threading problems. I don't run
> Windows or threads, so I'm probably not going to be much help to you
> on this, but if you're not using a build you got from perl.apache.org
> I would consider trying that first. Are you loading any other
> modules, or just running this one simple test?
>
> - Perrin
>


torsten.foertsch at gmx

Oct 10, 2008, 12:54 AM

Post #6 of 8 (781 views)
Permalink
Re: "Free to wrong pool" error in Apache logs under high load [In reply to]

On Fri 10 Oct 2008, Scott Tomilson wrote:
> I am running a build of mod_perl I got via perl.apache.org, yes (or I
> think probably linked to uwinnipeg?).  No other modules than the
> standard ones, plus the standard ActivePerl download from
> ActiveState.  We actually tried the same solution on Solaris and it
> worked fine.  It does seem specific to Windows itself - or more
> likely ActivePerl on Windows...

The windows MPM is multithreaded, the prefork MPM that you have probably
used on Solaris is not. That makes a difference.

Torsten

--
Need professional mod_perl support?
Just hire me: torsten.foertsch [at] gmx


scott.tomilson at gmail

Oct 10, 2008, 1:04 AM

Post #7 of 8 (785 views)
Permalink
Re: "Free to wrong pool" error in Apache logs under high load [In reply to]

Actually - we compiled Apache with MPM=worker on Solaris...

Scott


On Fri, Oct 10, 2008 at 4:54 PM, Torsten Foertsch
<torsten.foertsch [at] gmx>wrote:

> On Fri 10 Oct 2008, Scott Tomilson wrote:
> > I am running a build of mod_perl I got via perl.apache.org, yes (or I
> > think probably linked to uwinnipeg?). No other modules than the
> > standard ones, plus the standard ActivePerl download from
> > ActiveState. We actually tried the same solution on Solaris and it
> > worked fine. It does seem specific to Windows itself - or more
> > likely ActivePerl on Windows...
>
> The windows MPM is multithreaded, the prefork MPM that you have probably
> used on Solaris is not. That makes a difference.
>
> Torsten
>
> --
> Need professional mod_perl support?
> Just hire me: torsten.foertsch [at] gmx
>


scott.tomilson at gmail

Oct 10, 2008, 1:06 AM

Post #8 of 8 (797 views)
Permalink
Re: "Free to wrong pool" error in Apache logs under high load [In reply to]

Sorry - I mean MPM=worker (multi thread)

Cheers,
Scott

On Fri, Oct 10, 2008 at 5:04 PM, Scott Tomilson <scott.tomilson [at] gmail>wrote:

> Actually - we compiled Apache with MPM=worker on Solaris...
>
> Scott
>
>
>
> On Fri, Oct 10, 2008 at 4:54 PM, Torsten Foertsch <
> torsten.foertsch [at] gmx> wrote:
>
>> On Fri 10 Oct 2008, Scott Tomilson wrote:
>> > I am running a build of mod_perl I got via perl.apache.org, yes (or I
>> > think probably linked to uwinnipeg?). No other modules than the
>> > standard ones, plus the standard ActivePerl download from
>> > ActiveState. We actually tried the same solution on Solaris and it
>> > worked fine. It does seem specific to Windows itself - or more
>> > likely ActivePerl on Windows...
>>
>> The windows MPM is multithreaded, the prefork MPM that you have probably
>> used on Solaris is not. That makes a difference.
>>
>> Torsten
>>
>> --
>> Need professional mod_perl support?
>> Just hire me: torsten.foertsch [at] gmx
>>
>
>

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


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.