summaryrefslogtreecommitdiffstats
path: root/mod_perl.pl
diff options
context:
space:
mode:
Diffstat (limited to 'mod_perl.pl')
-rw-r--r--mod_perl.pl19
1 files changed, 5 insertions, 14 deletions
diff --git a/mod_perl.pl b/mod_perl.pl
index 15dec263a..abd018103 100644
--- a/mod_perl.pl
+++ b/mod_perl.pl
@@ -44,32 +44,23 @@ use Bugzilla::Util ();
# Pre-compile the CGI.pm methods that we're going to use.
Bugzilla::CGI->compile(qw(:cgi :push));
-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";
-}
+use 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->set_max_unshared_size(70_000);
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">
AddHandler perl-script .cgi
# No need to PerlModule these because they're already defined in mod_perl.pl
PerlResponseHandler Bugzilla::ModPerl::ResponseHandler
- PerlCleanupHandler Bugzilla::ModPerl::CleanupHandler
- $sizelimit
+ PerlCleanupHandler Apache2::SizeLimit Bugzilla::ModPerl::CleanupHandler
PerlOptions +ParseHeaders
Options +ExecCGI
AllowOverride Limit FileInfo Indexes