Forum: Rails deployment what to do if you can't use monit or similar

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
648d60296e65a1278017c0b9f960ec3a?d=identicon&s=25 Oliver Barnes (ol1barn3s)
on 2007-04-17 17:47
(Received via mailing list)
I need to get monitoring and automatic restart of my mongrel instances
at Rails Playground, but they don't let me install monit on my account
at this point.

can anyone point me to a simple shell script that could take care of
this as a cron job, til I can get better monitoring going?

C381828d1907912eab30cbe38d5ea245?d=identicon&s=25 Aníbal Rojas (Guest)
on 2007-04-21 13:46
(Received via mailing list)
Try something like this under your script/ folder


require 'net/http'

urls = [""]

urls.each do |url|

  uri = URI.parse(url)

  response = Net::HTTP.get_response(uri)

  if response.response.code.to_i != 200

    puts `/home/user/... choice of command to restart server`



The command to reap, restart depends of your setup (FastCGI, Mongrel,

Aníbal Rojas
This topic is locked and can not be replied to.