X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7fc2dbecd572718421d000441ccb305241e7d5ff..e83b793437184341c9a6fef2a1c6735c42fe1c30:/config/initializers/limits.rb diff --git a/config/initializers/limits.rb b/config/initializers/limits.rb index f88d43956..9862036f7 100644 --- a/config/initializers/limits.rb +++ b/config/initializers/limits.rb @@ -1,6 +1,4 @@ -# Limit each rails process to a 512Mb resident set size -Process.setrlimit Process::RLIMIT_AS, 640*1024*1024, Process::RLIM_INFINITY - -# Force a restart after every 10000 requests -COUNT = 0 -MAX_COUNT = 10000 +# Set a hard limit of 1Gb on the virtual size of the process +if Process.const_defined?(:RLIMIT_AS) + Process.setrlimit Process::RLIMIT_AS, 1024*1024*1024, Process::RLIM_INFINITY +end