From: Tom Hughes Date: Tue, 15 Jan 2008 00:41:07 +0000 (+0000) Subject: Don't try and limit the address space if the OS does not support it. X-Git-Tag: live~8001 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/065d3dc16b5d70f2e3b40640e6c56af4e733b8f4?hp=1e54573bae7eed568e99ebc0b0d448170f08c880 Don't try and limit the address space if the OS does not support it. --- diff --git a/config/initializers/limits.rb b/config/initializers/limits.rb index f88d43956..485d95e9c 100644 --- a/config/initializers/limits.rb +++ b/config/initializers/limits.rb @@ -1,5 +1,7 @@ -# Limit each rails process to a 512Mb resident set size -Process.setrlimit Process::RLIMIT_AS, 640*1024*1024, Process::RLIM_INFINITY +# Limit each rails process to a 512Mb resident set size if possible +if Process.const_defined?(:RLIMIT_AS) + Process.setrlimit Process::RLIMIT_AS, 640*1024*1024, Process::RLIM_INFINITY +end # Force a restart after every 10000 requests COUNT = 0