Increase the hard memory limit and set a lower soft limit that does a

clean restart between requests.
This commit is contained in:
Tom Hughes 2009-04-26 16:56:40 +00:00
parent aadb91861a
commit 1bd3710134
2 changed files with 29 additions and 3 deletions

View file

@ -1,6 +1,6 @@
# Limit each rails process to a 512Mb resident set size if possible
# Set a hard limit of 1Gb on the virtual size of the process
if Process.const_defined?(:RLIMIT_AS)
Process.setrlimit Process::RLIMIT_AS, 640*1024*1024, Process::RLIM_INFINITY
Process.setrlimit Process::RLIMIT_AS, 1024*1024*1024, Process::RLIM_INFINITY
end
# Force a restart after every 10000 requests