projects
/
rails.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e54573
)
Don't try and limit the address space if the OS does not support it.
author
Tom Hughes
<tom@compton.nu>
Tue, 15 Jan 2008 00:41:07 +0000
(
00:41
+0000)
committer
Tom Hughes
<tom@compton.nu>
Tue, 15 Jan 2008 00:41:07 +0000
(
00:41
+0000)
config/initializers/limits.rb
patch
|
blob
|
history
diff --git
a/config/initializers/limits.rb
b/config/initializers/limits.rb
index f88d43956f86f649522657c1c246d6bf607fbbd6..485d95e9c98c03d57547d815c35389ac00215df1 100644
(file)
--- 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