Преглед на файлове

Change unicorn worker count to min(4*cores,8) to accommodate RAM-limited
VMs.
"Quad-core" 384 MB VM was getting crushed by unicorn footprint.

Troy Davis преди 14 години
родител
ревизия
5dc784a0e2
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      recipes/unicorn.rb

+ 1 - 1
recipes/unicorn.rb

@@ -23,7 +23,7 @@ include_recipe "unicorn"
 
 node.default[:unicorn][:worker_timeout] = 60
 node.default[:unicorn][:preload_app] = false
-node.default[:unicorn][:worker_processes] = node[:cpu][:total].to_i * 4 
+node.default[:unicorn][:worker_processes] = [node[:cpu][:total].to_i * 4, 8].min
 node.default[:unicorn][:preload_app] = false
 node.default[:unicorn][:before_fork] = 'sleep 1' 
 node.default[:unicorn][:port] = '8080'