You are viewing a plain text version of this content. The canonical link for it is here.
Posted to asp@perl.apache.org by James I Hightower <Ja...@slma.com> on 2002/03/06 14:28:51 UTC

apache server startup problem with Apache::ASP

All,

I have been developing a web application with apache, mod_perl and Apache::ASP
on a Linux box for some time now and have experienced no problems until today.
Today I was unable to bounce apache server.  I had just copied a newly-developed
.asp module to the Apache::ASP Global directory so I figured that was the
culprit.  However, after some experimentation I realized the new module wasn't
the problem since I  was able to get the apache server to startup by removing
any one module from the Global directory (while leaving the new module).

The PC I am using has 128K of memory.   I'm guessing  I am running out of memory
during apache server startup since I can achieve server startup by removing any
one module.   The application works fine after server startup as long as I avoid
invoking any module I omitted.  The apache error_log shows no errors.

Are there any other reasons this may happen outside of lack of memory?  Are
there some apache, mod_perl, or Apache::ASP configuration settings that could be
related to this problem?  At this point my entire application consists of 30
scripts/modules.

I figure I'll have to  break down and get a new development PC since my current
machine has no more memory capacity.



Below are my relevant apache htppd.conf entries:


<Files ~ (ADK.+\.asp)>

     SetHandler perl-script
     PerlHandler Apache::ASP

        PerlSetVar UseStrict 1
        PerlSetVar Global  /usr/local/apache/ADDRKEEP/asp
#        PerlSetVar GlobalPackage main
        PerlSetVar StateDir  /tmp/ADDRKEEP
        PerlSetVar StateDB MLDBM::Sync::SDBM_File
        PerlSetVar StateSerializer Storable
        PerlSetVar StateCache 1
        PerlSetVar Debug 2
        PerlSetVar SessionTimeout  1440
        PerlSetVar StateManager 4
        PerlSetVar StatScripts  0

</Files>


<Files ~ (ADK.+\.pm)>

     SetHandler perl-script
     PerlHandler Apache::ASP

        PerlSetVar UseStrict 1
#        PerlSetVar Global  /usr/local/apache/ADDRKEEP/asp
        PerlSetVar GlobalPackage main
        PerlSetVar StateDir  /tmp/ADDRKEEP
        PerlSetVar StateDB MLDBM::Sync::SDBM_File
        PerlSetVar StateSerializer Storable
        PerlSetVar StateCache 1
        PerlSetVar Debug 2
        PerlSetVar SessionTimeout  1440
        PerlSetVar StateManager 4
        PerlSetVar StatScripts  0

</Files>


<Files ~ (ADK.+\.html)>

     SetHandler perl-script
     PerlHandler Apache::ASP

        PerlSetVar UseStrict 1
        PerlSetVar Global  /usr/local/apache/ADDRKEEP/asp
#        PerlSetVar GlobalPackage main
        PerlSetVar StateDir  /tmp/ADDRKEEP
        PerlSetVar StateDB MLDBM::Sync::SDBM_File
        PerlSetVar StateSerializer Storable
        PerlSetVar StateCache 1
        PerlSetVar Debug 2
        PerlSetVar SessionTimeout  1440
        PerlSetVar StateManager 4
        PerlSetVar StatScripts  0
        PerlSetVar RegisterIncludes 1

</Files>



<Perl>

use Apache::ASP;

Apache::ASP->Loader( '/usr/local/apache/ADDRKEEP/asp',
                     "(asp|html|pm)\$",
                     'Global'  => '/usr/local/apache/ADDRKEEP/asp',
                     'Debug' => 2,
                    );



use lib "/usr/local/ADDRKEEP/perl";

</Perl>


PerlModule JIHbuildPageCode



Thanks,

Jim





---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org


Re: apache server startup problem with Apache::ASP

Posted by Joshua Chamas <jo...@chamas.com>.
James I Hightower wrote:
> 
> All,
> 
> I have been developing a web application with apache, mod_perl and Apache::ASP
> on a Linux box for some time now and have experienced no problems until today.
> Today I was unable to bounce apache server.  I had just copied a newly-developed
> .asp module to the Apache::ASP Global directory so I figured that was the
> culprit.  However, after some experimentation I realized the new module wasn't
> the problem since I  was able to get the apache server to startup by removing
> any one module from the Global directory (while leaving the new module).
> 
> The PC I am using has 128K of memory.   I'm guessing  I am running out of memory
> during apache server startup since I can achieve server startup by removing any
> one module.   The application works fine after server startup as long as I avoid
> invoking any module I omitted.  The apache error_log shows no errors.
> 

I have never heard of this before, so what follows is more general 
troubleshooting techniques...

Check out what happens to your system under top when it hangs.  How much
free RAM do you have, does your machine start to swap ?  If you run
the raw httpd command from the init.d httpd/apache script with a -X
modifier from the command line, this can help debug things, just
do something like this:

  bash> strace httpd -X 

you can hit the web server as normal, but it is in single process
mode, and you might be able to see better on which system call 
it hangs.  If you keep top running in a separate window while you
do this, you could glean some information pointing at the real
problem, whatever it may be.

>         PerlSetVar StateDB MLDBM::Sync::SDBM_File
>         PerlSetVar StateSerializer Storable
>         PerlSetVar StateCache 1
>         PerlSetVar Debug 2
>         PerlSetVar SessionTimeout  1440
>         PerlSetVar StateManager 4
>         PerlSetVar StatScripts  0
> 

There is a lot of redundant information in your conf file. I think
you will find that you can move PerlSetVar configs out of 
<Files> blocks to one level higher to cover all of the Files
blocks if they share common settings.

> 
> use Apache::ASP;
> 
> Apache::ASP->Loader( '/usr/local/apache/ADDRKEEP/asp',
>                      "(asp|html|pm)\$",
>                      'Global'  => '/usr/local/apache/ADDRKEEP/asp',
>                      'Debug' => 2,
>                     );
> 
> use lib "/usr/local/ADDRKEEP/perl";
> 

I would put the "use lib" line before the Apache::ASP->Loader() line,
but it probably really doens't matter since the use should get
executed first anyway.  But the reality is the ASP application that you
are precompiling probably depends on modules in ADDRKEEP being
available.

Let us know what you figure out, bizarre problem really.

-- Josh
_________________________________________________________________
Joshua Chamas                           Chamas Enterprises Inc.
NodeWorks Founder                       Huntington Beach, CA  USA 
http://www.nodeworks.com                1-714-625-4051

---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@perl.apache.org
For additional commands, e-mail: asp-help@perl.apache.org