[ic] PreFork causes errors

Kevin Walsh interchange-users@interchange.redhat.com
Wed Mar 6 19:39:01 2002


> 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 can't
repeat your problem here, and you said it only happened on one
of your machines.  Is there any difference in the machine and
Interchange setups that should be taken into consideration?

-- 
   _/   _/  _/_/_/_/  _/    _/  _/_/_/  _/    _/
  _/_/_/   _/_/      _/    _/    _/    _/_/  _/   K e v i n   W a l s h
 _/ _/    _/          _/ _/     _/    _/  _/_/    kevin@cursor.biz
_/   _/  _/_/_/_/      _/    _/_/_/  _/    _/