Skip to content

Instantly share code, notes, and snippets.

View lylo's full-sized avatar

Olly Headey lylo

View GitHub Profile
#!/usr/bin/env ruby
#
# Find bloating passengers and kill them gracefully. Run from cron every minute.
#
# required for passenger since cron has no environment
ENV['HTTPD'] = 'httpd'
MEM_LIMIT = ARGV[0] || 500