Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Monitor your Phusion passenger instances. This script allows you to automatically gracefully reload passenger instances (if they ate too much memory). See the required library:
#!/usr/bin/env ruby
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'passenger_monitor'))
# Set logger to log into Rails project /log directory and start monitoring
:log_file => File.join(File.dirname(__FILE__), '..', 'log', 'passenger_monitor.log'),
:memory_limit => 400, # this is in MB
:wait_time => 10, # this in seconds (timeout before attempts)
:attempts => 5 # number of attempts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.