Skip to content

Instantly share code, notes, and snippets.

@ezmobius
Created August 1, 2008 01:44
Show Gist options
  • Save ezmobius/3559 to your computer and use it in GitHub Desktop.
Save ezmobius/3559 to your computer and use it in GitHub Desktop.
# /etc/monit.d/merb.<%= @appname %>.monitrc
<% (@merb_base_port).upto(@merb_base_port + (@merb_instance_count - 1)) do |port| %>
check process merb_<%= @appname %>_<%= port %>
with pidfile /var/run/engineyard/<%= @appname %>/merb.<%= port %>.pid
start program = "/engineyard/bin/merb start <%= @appname %> <%= @port %> <%= @environment %>" as uid <%= @username %> and gid <%= @username %>
stop program = "/engineyard/bin/merb stop <%= @appname %> <%= @port %> <%= @environment %>" as uid <%= @username %> and gid <%= @username %>
if totalmem is greater than 80.0 MB for 2 cycles then restart # eating up memory?
group merb_<%= @appname %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment