[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] PreFork causes errors
On Wed, 2002-03-06 at 19:36, Kevin Walsh wrote:
> > I am not receiving Internal Server errors any longer, regardless of the
> > suggestion above. About 9 out of 10 times I get a partial page. The
> > other time I get what I expect.
> >
> > Here are some more details.
> >
> > I have a UserTag like this:
> > UserTag layout HasEndTag 1
> > UserTag layout Routine <<EOR
> > sub {
> > my $input = shift;
> > return <<"EOL";
> > $Variable->{TOP}
> > $Variable->{HEADER}
> > $input
> > $Variable->{FOOTER}
> > $Variable->{BOT}
> > EOL
> > }
> > EOR
> >
> > A typical page looks like this:
> > index.html:
> > [layout]
> > [query ....][/query]
> > And other HTML and IC stuff
> > [/layout]
> >
> > When I request index.html 9 out of 10 times I get TOP, HEADER, FOOTER
> > and BOT but not the body of the page.
> >
> > This behavior goes away when I don't set PreFork on the production
> > machines. I never have this problem on my Devo machine.
> >
> I don't know the reason for the problem you are reporting, but
> the tag you have posted seems excessively wasteful and unnecessary
> to me. You are passing a lot of information around by using your
> [layout] tag.
>
> As an alternative approach to the above, perhaps you could declare
> two more variables, as follows:
>
> LAYOUT_START just includes __TOP__ and __HEADER__
> LAYOUT_END just includes __FOOTER__ and __BOT__
>
> ...then re-arrange your pages as follows:
>
> __LAYOUT_START__
> [query ...][/query]
> And other HTML and IC stuff
> __LAYOUT_END__
>
> If nothing else, your pages will be quicker to parse.
I tried you suggestion and the page came up slightly slower. I tested
with 'ab -n 100 -c 5' on the devo machine.
--
Bill Carr
Worldwide Impact
bill@worldwideimpact.com
413-253-6700