Apache-ASP

 view release on metacpan or  search on metacpan

ASP.pm  view on Meta::CPAN


Note that the Session Manager is very robust on its own, and denial
of service attacks of the types that spiders and other web bots 
normally execute are not likely to affect the Session Manager significantly.

=item How can I use $Session to store a $dbh database handle ?

You cannot use $Session to store a $dbh handle.  This can 
be awkward for those coming from the IIS/NT world, where
you could store just about anything in $Session, but this
boils down to a difference between threads vs. processes.

Database handles often have per process file handles open,
which cannot be shared between requests, so though you 
have stored the $dbh data in $Session, all the other 
initializations are not relevant in another httpd process.

All is not lost! Apache::DBI can be used to cache 
database connections on a per process basis, and will
work for most cases.

ASP.pm  view on Meta::CPAN


Set your MaxClients low, such that if you have that
many httpd servers running, which will happen on busy site,
your system will not start swapping to disk because of 
excessive RAM usage.  Typical settings are less than 100
even with 1 gig RAM!  To handle more client connections,
look into a dual server, mod_proxy front end.

=head2 High MaxRequestsPerChild

Set your max requests per child thread or process (in httpd.conf) high, 
so that ASP scripts have a better chance being cached, which happens after 
they are first compiled.  You will also avoid the process fork penalty on 
UNIX systems.  Somewhere between 50 - 500 is probably pretty good.
You do not want to set this too high though or you will risk having
your web processes use too much RAM.  One may use Apache::SizeLimit
or Apache::GTopLimit to optimally tune MaxRequestsPerChild at runtime.

=head2 Precompile Modules

For those modules that your Apache::ASP application uses,

ASP.pm  view on Meta::CPAN


 - Fixed bug where XMLSubs where removing <?xml version ... ?> tag
   when it was needed in XSLT mode.

 + $Server->Mail({ CC => '...', BCC => '...' }), now works to send
   CC & BCC headers/recipients.

 + Removed $Apache::ASP::Register definition which defined the current
   executing Apache::ASP object.  Only one part of the application was
   using it, and this has been fixed.  This would have been an unsafe
   use of globals for a threaded environment.

 + Decreased latency when doing Application_OnStart, used to sleep(1) 
   for CleanupMaster sync, but this is not necessary for Application_OnStart 
   scenario

 + Restructure code / core templates for MailErrorsTo funcationality.  
   Wrote test mail_error.t to cover this.  $ENV{REMOTE_USER} will now 
   be displayed in the MailErrorsTo message when defined from 401 basic auth.

 + $Server->RegisterCleanup should be thread safe now, as it no longer relies
   on access to @Apache::ASP::Cleanup for storing the CODE ref stack.

 + test t/inode_names.t for InodeNames and other file tests covering case
   of long file names.

 - Fixed long file name sub identifier bug.  Added test t/long_names.t.

 + CacheDir may now be set independently of StateDir.  It used to default
   to StateDir if it was set.

README  view on Meta::CPAN

        way to configure Apache::ASP at runtime.

        Note that the Session Manager is very robust on its own, and denial of
        service attacks of the types that spiders and other web bots normally
        execute are not likely to affect the Session Manager significantly.

    How can I use $Session to store a $dbh database handle ?
        You cannot use $Session to store a $dbh handle. This can be awkward for
        those coming from the IIS/NT world, where you could store just about
        anything in $Session, but this boils down to a difference between
        threads vs. processes.

        Database handles often have per process file handles open, which cannot
        be shared between requests, so though you have stored the $dbh data in
        $Session, all the other initializations are not relevant in another
        httpd process.

        All is not lost! Apache::DBI can be used to cache database connections
        on a per process basis, and will work for most cases.

  Development

README  view on Meta::CPAN

    $Application->Lock() in your global.asa's Script_OnStart.

  Low MaxClients
    Set your MaxClients low, such that if you have that many httpd servers
    running, which will happen on busy site, your system will not start swapping
    to disk because of excessive RAM usage. Typical settings are less than 100
    even with 1 gig RAM! To handle more client connections, look into a dual
    server, mod_proxy front end.

  High MaxRequestsPerChild
    Set your max requests per child thread or process (in httpd.conf) high, so
    that ASP scripts have a better chance being cached, which happens after they
    are first compiled. You will also avoid the process fork penalty on UNIX
    systems. Somewhere between 50 - 500 is probably pretty good. You do not want
    to set this too high though or you will risk having your web processes use
    too much RAM. One may use Apache::SizeLimit or Apache::GTopLimit to
    optimally tune MaxRequestsPerChild at runtime.

  Precompile Modules
    For those modules that your Apache::ASP application uses, make sure that
    they are loaded in your sites startup.pl file, or loaded with PerlModule in

README  view on Meta::CPAN


         - Fixed bug where XMLSubs where removing <?xml version ... ?> tag
           when it was needed in XSLT mode.

         + $Server->Mail({ CC => '...', BCC => '...' }), now works to send
           CC & BCC headers/recipients.

         + Removed $Apache::ASP::Register definition which defined the current
           executing Apache::ASP object.  Only one part of the application was
           using it, and this has been fixed.  This would have been an unsafe
           use of globals for a threaded environment.

         + Decreased latency when doing Application_OnStart, used to sleep(1) 
           for CleanupMaster sync, but this is not necessary for Application_OnStart 
           scenario

         + Restructure code / core templates for MailErrorsTo funcationality.  
           Wrote test mail_error.t to cover this.  $ENV{REMOTE_USER} will now 
           be displayed in the MailErrorsTo message when defined from 401 basic auth.

         + $Server->RegisterCleanup should be thread safe now, as it no longer relies
           on access to @Apache::ASP::Cleanup for storing the CODE ref stack.

         + test t/inode_names.t for InodeNames and other file tests covering case
           of long file names.

         - Fixed long file name sub identifier bug.  Added test t/long_names.t.

         + CacheDir may now be set independently of StateDir.  It used to default
           to StateDir if it was set.

lib/Apache/ASP/Server.pm  view on Meta::CPAN

}

sub CreateObject {
    my($self, $name) = @_;
    my $asp = $self->{asp};

    # dynamically load OLE at request time, especially since
    # at server startup, this seems to fail with "start_mutex" error
    #
    # no reason to preload this unix style when module loads
    # because in win32, threaded model does not need this prefork 
    # parent httpd compilation
    #
    unless(defined $OLESupport) {
	eval 'use Win32::OLE';
	if($@) {
	    $OLESupport = 0;
	} else {
	    $OLESupport = 1;
	}
    }

site/changes.html  view on Meta::CPAN


 - Fixed bug where XMLSubs where removing &lt;?xml version ... ?&gt; tag
   when it was needed in XSLT mode.

 + $Server-&gt;Mail({ CC =&gt; &#39;...&#39;, BCC =&gt; &#39;...&#39; }), now works to send
   CC &amp; BCC headers/recipients.

 + Removed $Apache::ASP::Register definition which defined the current
   executing Apache::ASP object.  Only one part of the application was
   using it, and this has been fixed.  This would have been an unsafe
   use of globals for a threaded environment.

 + Decreased latency when doing Application_OnStart, used to sleep(1) 
   for CleanupMaster sync, but this is not necessary for Application_OnStart 
   scenario

 + Restructure code / core templates for MailErrorsTo funcationality.  
   Wrote test mail_error.t to cover this.  $ENV{REMOTE_USER} will now 
   be displayed in the MailErrorsTo message when defined from 401 basic auth.

 + $Server-&gt;RegisterCleanup should be thread safe now, as it no longer relies
   on access to @Apache::ASP::Cleanup for storing the CODE ref stack.

 + test t/inode_names.t for InodeNames and other file tests covering case
   of long file names.

 - Fixed long file name sub identifier bug.  Added test t/long_names.t.

 + CacheDir may now be set independently of StateDir.  It used to default
   to StateDir if it was set.

site/faq.html  view on Meta::CPAN

of service attacks of the types that spiders and other web bots 
normally execute are not likely to affect the Session Manager significantly.</font>
	
	<p>
	<a name=How%20can%20I%20us50054dc6></a>
	<font face=verdana><font class=title size=-1 color=#555555><b>How can I use $Session to store a $dbh database handle ?</b></font>
<font face="courier new" size=3><pre>
</pre></font>You cannot use $Session to store a $dbh handle.  This can 
be awkward for those coming from the IIS/NT world, where
you could store just about anything in $Session, but this
boils down to a difference between threads vs. processes.
<font face="courier new" size=3><pre>
</pre></font>Database handles often have per process file handles open,
which cannot be shared between requests, so though you 
have stored the $dbh data in $Session, all the other 
initializations are not relevant in another httpd process.
<font face="courier new" size=3><pre>
</pre></font>All is not lost! Apache::DBI can be used to cache 
database connections on a per process basis, and will
work for most cases.</font>
	

site/tuning.html  view on Meta::CPAN

many httpd servers running, which will happen on busy site,
your system will not start swapping to disk because of 
excessive RAM usage.  Typical settings are less than 100
even with 1 gig RAM!  To handle more client connections,
look into a dual server, mod_proxy front end.</font>
	
	<p>
	<a name=High%20MaxRequ0724a06d></a>
	<font face=verdana><font class=title size=+0 color=#555555><b>High MaxRequestsPerChild</b></font>
<font face="courier new" size=3><pre>
</pre></font>Set your max requests per child thread or process (in httpd.conf) high, 
so that ASP scripts have a better chance being cached, which happens after 
they are first compiled.  You will also avoid the process fork penalty on 
UNIX systems.  Somewhere between 50 - 500 is probably pretty good.
You do not want to set this too high though or you will risk having
your web processes use too much RAM.  One may use Apache::SizeLimit
or Apache::GTopLimit to optimally tune MaxRequestsPerChild at runtime.</font>
	
	<p>
	<a name=Precompile%20M39676a96></a>
	<font face=verdana><font class=title size=+0 color=#555555><b>Precompile Modules</b></font>



( run in 0.718 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )