Sha256: 6d07306e5b44f9195800ac48bd53bdcd2d7036e8e60f2da15459e590e0f5791c
Contents?: true
Size: 1.18 KB
Versions: 11
Compression:
Stored size: 1.18 KB
Contents
<% application = fetch(:application) %> set mail-format { subject: <%= "#{fetch(:full_app_name)} - #{fetch(:rails_env)}" %> $SERVICE $EVENT at $DATE } check process unicorn with pidfile <%= current_path %>/tmp/pids/unicorn.pid start program = "/etc/init.d/unicorn_<%= application %>_<%= fetch(:rails_env)%> start" stop program = "/etc/init.d/unicorn_<%= application %>_<%= fetch(:rails_env)%> stop" if mem is greater than 300.0 MB for 1 cycles then restart # eating up memory? if cpu is greater than 50% for 2 cycles then alert # send an email to admin if cpu is greater than 80% for 30 cycles then restart # hung process? group unicorn <% (0..(fetch(:unicorn_worker_count) -1)).each do |worker| %> check process unicorn_worker_<%= (5000 + worker).to_s %> with pidfile <%= current_path %>/tmp/pids/unicorn.<%= (5000 + worker).to_s %>.pid start program = "/bin/true" stop program = "/etc/init.d/unicorn_<%= application %>_<%= fetch(:rails_env)%> kill_worker <%= (5000 + worker).to_s %>" if mem is greater than 350.0 MB for 1 cycles then restart if cpu is greater than 80% for 30 cycles then restart group unicorn_workers <% end %>
Version data entries
11 entries across 11 versions & 3 rubygems