# file.
use Apache2::ServerUtil;
-use Apache2::SizeLimit;
use ModPerl::RegistryLoader ();
use CGI ();
CGI->compile(qw(:cgi -no_xhtml -oldstyle_urls :private_tempfiles
use Bugzilla::Template ();
use Bugzilla::Util ();
-# This means that every httpd child will die after processing
-# a CGI if it is taking up more than 70MB of RAM all by itself.
-$Apache2::SizeLimit::MAX_UNSHARED_SIZE = 70000;
+my ($sizelimit, $maxrequests) = ('', '');
+if (Bugzilla::Constants::ON_WINDOWS) {
+ $maxrequests = "MaxRequestsPerChild 25";
+}
+else {
+ require Apache2::SizeLimit;
+ # This means that every httpd child will die after processing
+ # a CGI if it is taking up more than 70MB of RAM all by itself.
+ $Apache2::SizeLimit::MAX_UNSHARED_SIZE = 70000;
+ $sizelimit = "PerlCleanupHandler Apache2::SizeLimit";
+}
my $cgi_path = Bugzilla::Constants::bz_locations()->{'cgi_path'};
# Set up the configuration for the web server
my $server = Apache2::ServerUtil->server;
my $conf = <<EOT;
+$maxrequests
# Make sure each httpd child receives a different random seed (bug 476622)
PerlChildInitHandler "sub { srand(); }"
<Directory "$cgi_path">
# No need to PerlModule these because they're already defined in mod_perl.pl
PerlResponseHandler Bugzilla::ModPerl::ResponseHandler
PerlCleanupHandler Bugzilla::ModPerl::CleanupHandler
- PerlCleanupHandler Apache2::SizeLimit
+ $sizelimit
PerlOptions +ParseHeaders
Options +ExecCGI
AllowOverride Limit