Sha256: 20fd50c623fe1229db0b27ad5464aca52678dcf2dc04a10cb79c8d47fe7f214e

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

God.watch do |w|
  w.name  = "varnish"
  w.group = "proxy"
  w.autostart = false

  w.start     = "/etc/init.d/varnish start"
  w.stop      = "/etc/init.d/varnish stop"
  w.restart   = "/etc/init.d/varnish restart"
  w.pid_file  = "/var/run/varnishd.pid"
  w.grace     = 10.seconds
 
  default_configurations(w)
  
  # I'm not sure if it's very useful to monitor the varnishd memory usage,
  # because it writes the pid of the varnishd parent process in it's pid file,
  # so I assume that's what god is monitoring, and the varnishd parent starts
  # a child process to do the real work.
  # Also, the child process allocates all cache storage with malloc, so the
  # VSS size can get very large and depends on the amount of storage 
  # configured. It relies on the OS to page unused portions to disk, but at
  # the moment we don't have much swap configured (just using the defaults
  # from Eric Hammond's base image).
  restart_if_resource_hog(w, :memory_usage => 100.megabytes, :cpu_usage => 50.percent)
  
  monitor_lifecycle(w)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pauldowman-ec2onrails-0.9.10.1 server/files/etc/god/proxy.god