Skip to content

Instantly share code, notes, and snippets.

@melo
Created October 14, 2011 11:57
Show Gist options
  • Save melo/1286900 to your computer and use it in GitHub Desktop.
Save melo/1286900 to your computer and use it in GitHub Desktop.
Work around bad choice for Apache::SizeLimit::Core policy on old CentOS
use Apache::SizeLimit;
BEGIN {
### Don't try this at home kids...
# this version of CentOS is too old, no read-access to
# /proc/self/smaps unless you are root
no warnings;
$Apache::SizeLimit::Core::USE_SMAPS = 0;
*Apache::SizeLimit::Core::_platform_check_size =
\&Apache::SizeLimit::Core::_linux_size_check;
Apache::SizeLimit->set_max_process_size(120_000); # Max size in KB
Apache::SizeLimit->set_check_interval(1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment