diff options
author | mkanat%bugzilla.org <> | 2007-02-25 11:43:24 +0100 |
---|---|---|
committer | mkanat%bugzilla.org <> | 2007-02-25 11:43:24 +0100 |
commit | 3e0499c3f9123231dace185b651e59af65176d7d (patch) | |
tree | 7c9e8e51a31db862f38675199a4c5002fbc95017 | |
parent | bc84c5a4f99c70556beac98b505c12b7c9a5c484 (diff) | |
download | bugzilla-3e0499c3f9123231dace185b651e59af65176d7d.tar.gz bugzilla-3e0499c3f9123231dace185b651e59af65176d7d.tar.xz |
Bug 370010: Use Apache::SizeLimit in mod_perl.pl to limit outrageous Apache memory usage
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=justdave, a=mkanat
-rw-r--r-- | mod_perl.pl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mod_perl.pl b/mod_perl.pl index 6c01d8e88..cb2f635f9 100644 --- a/mod_perl.pl +++ b/mod_perl.pl @@ -30,6 +30,7 @@ use strict; use Apache::DBI (); use Apache2::ServerUtil; +use Apache2::SizeLimit; use ModPerl::RegistryLoader (); use CGI (); CGI->compile(qw(:cgi -no_xhtml -oldstyle_urls :private_tempfiles @@ -44,6 +45,10 @@ use Bugzilla::Mailer (); 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 $cgi_path = Bugzilla::Constants::bz_locations()->{'cgi_path'}; # Set up the configuration for the web server @@ -54,6 +59,7 @@ my $conf = <<EOT; # 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 PerlOptions +ParseHeaders Options +ExecCGI AllowOverride Limit |