From 51ac92ea47ae2ae43675e57185984f7fd57e07f1 Mon Sep 17 00:00:00 2001 From: Dylan William Hardison Date: Wed, 14 Mar 2018 18:24:49 -0400 Subject: Bug 1445700 - apache_size_limit should be 800_000 when Linux::Smaps is not installed. --- mod_perl.pl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mod_perl.pl') diff --git a/mod_perl.pl b/mod_perl.pl index 09fd80850..73406be56 100644 --- a/mod_perl.pl +++ b/mod_perl.pl @@ -55,6 +55,7 @@ use Apache2::SizeLimit; use ModPerl::RegistryLoader (); use File::Basename (); use File::Find (); +use English qw(-no_match_vars $OSNAME); # This loads most of our modules. use Bugzilla (); @@ -78,8 +79,9 @@ Bugzilla::CGI->compile(qw(:cgi :push)); # is taking up more than $apache_size_limit of RAM all by itself, not counting RAM it is # sharing with the other httpd processes. my $limit = Bugzilla->localconfig->{apache_size_limit}; -if ($limit < 400_000) { - $limit = 400_000; +if ($OSNAME eq 'linux' && ! eval { require Linux::Smaps }) { + warn "SizeLimit requires Linux::Smaps on linux. size limit set to 800MB"; + $limit = 800_000; } Apache2::SizeLimit->set_max_unshared_size($limit); -- cgit v1.2.3-24-g4f1b