diff options
author | Dylan Hardison <dylan@mozilla.com> | 2015-11-04 04:09:25 +0100 |
---|---|---|
committer | Dylan Hardison <dylan@mozilla.com> | 2015-11-04 04:09:25 +0100 |
commit | 338bad479a7b75c656e0c99438629322cc9b8721 (patch) | |
tree | 28a9748d05bef520a834ade190b61ae2aed2a8e6 | |
parent | b5271cab904a4802b04caa5cf3f08d8d80272183 (diff) | |
download | bugzilla-338bad479a7b75c656e0c99438629322cc9b8721.tar.gz bugzilla-338bad479a7b75c656e0c99438629322cc9b8721.tar.xz |
Bug 1219750 - Allow Apache2::SizeLimit to be configured via params
-rw-r--r-- | Bugzilla/Install/Localconfig.pm | 4 | ||||
-rw-r--r-- | mod_perl.pl | 15 | ||||
-rw-r--r-- | template/en/default/setup/strings.txt.pl | 4 |
3 files changed, 18 insertions, 5 deletions
diff --git a/Bugzilla/Install/Localconfig.pm b/Bugzilla/Install/Localconfig.pm index dbc0624d3..0ca40ed1b 100644 --- a/Bugzilla/Install/Localconfig.pm +++ b/Bugzilla/Install/Localconfig.pm @@ -126,6 +126,10 @@ use constant LOCALCONFIG_VARS => ( shadowdbsock => undef, }, }, + { + name => 'apache_size_limit', + default => 250000, + }, ); sub read_localconfig { diff --git a/mod_perl.pl b/mod_perl.pl index be4f18bdf..f283006cc 100644 --- a/mod_perl.pl +++ b/mod_perl.pl @@ -58,14 +58,19 @@ BEGIN { *CORE::GLOBAL::warn = \&Apache2::ServerRec::warn; } Bugzilla::CGI->compile(qw(:cgi :push)); use Apache2::SizeLimit; + # This means that every httpd child will die after processing a request if it -# is taking up more than 700MB of RAM all by itself, not counting RAM it is +# is taking up more than $apache_size_limit of RAM all by itself, not counting RAM it is # sharing with the other httpd processes. -if (Bugzilla->params->{'urlbase'} eq 'https://bugzilla.mozilla.org/') { - Apache2::SizeLimit->set_max_unshared_size(700_000); -} else { - Apache2::SizeLimit->set_max_unshared_size(250_000); +my $apache_size_limit = 250_000; +if (Bugzilla->localconfig->{apache_size_limit}) { + $apache_size_limit = Bugzilla->localconfig->{apache_size_limit}; +} +elsif (Bugzilla->params->{'urlbase'} eq 'https://bugzilla.mozilla.org/') { + $apache_size_limit = 700_000; } +else +Apache2::SizeLimit->set_max_unshared_size($apache_size_limit); my $cgi_path = Bugzilla::Constants::bz_locations()->{'cgi_path'}; diff --git a/template/en/default/setup/strings.txt.pl b/template/en/default/setup/strings.txt.pl index 72ffb4a4d..d7c7e0500 100644 --- a/template/en/default/setup/strings.txt.pl +++ b/template/en/default/setup/strings.txt.pl @@ -280,6 +280,10 @@ and you cannot set this up any other way. YOU HAVE BEEN WARNED! If you set this to anything other than "", you will need to run checksetup.pl as ##root## or as a user who is a member of the specified group. END + localconfig_apache_size_limit => <<EOT, +This is the max amount of unshared memory the apache process is allowed to use +before Apache::SizeLimit kills it. This is only applicable when run under mod_perl. +EOT max_allowed_packet => <<EOT, WARNING: You need to set the max_allowed_packet parameter in your MySQL configuration to at least ##needed##. Currently it is set to ##current##. |