Rails sites went down without my knowledge

28 views
Skip to first unread message

Jason Hsu, Rubyist

unread,
Sep 9, 2013, 10:35:30 PM9/9/13
to rubyonra...@googlegroups.com
I found that both of my Rails sites went down tonight without my knowledge, and I was getting 502 errors when I tried to visit these sites.  Both are hosted by the same company.  Fortunately, I was able to get the sites back up and running simply by restarting them.

Are there any services out there that I can use to automatically monitor my sites and send me an email and/or text message if my sites go down?

Additionally, would it be a good idea to set the cron jobs on my sites to automatically restart the sites on a regular basis?  If so, how often should my sites be restarted?

Jordon Bedwell

unread,
Sep 9, 2013, 10:57:13 PM9/9/13
to rubyonra...@googlegroups.com
On Mon, Sep 9, 2013 at 9:35 PM, Jason Hsu, Rubyist <jhsu8...@gmail.com> wrote:
> Are there any services out there that I can use to automatically monitor my
> sites and send me an email and/or text message if my sites go down?

There are literally thousands, Google is your best bet for this solution.

> Additionally, would it be a good idea to set the cron jobs on my sites to
> automatically restart the sites on a regular basis? If so, how often should
> my sites be restarted?

No, that would be a horrible idea... first you need o figure out why
the it went down and correct it, then you should look into something
like God (not so Godly ironically) or monit or anything of the sorts
that will hearbeat your site and kick it back on if it falls down.
You should probably be tracking errors with something like honeybadger
or airbrake so you can see this kind of shit coming.

Jason Hsu, Rubyist

unread,
Sep 10, 2013, 2:13:39 AM9/10/13
to rubyonra...@googlegroups.com
Thanks, Jordon.  The best web site monitoring solution I found is through Google Docs.  For more on this solution, go to:
http://www.labnol.org/internet/website-uptime-monitor/21060/

Tamara Temple

unread,
Sep 10, 2013, 3:24:36 AM9/10/13
to rubyonra...@googlegroups.com

On Sep 9, 2013, at 9:35 PM, "Jason Hsu, Rubyist" <jhsu8...@gmail.com> wrote:

> I found that both of my Rails sites went down tonight without my knowledge, and I was getting 502 errors when I tried to visit these sites. Both are hosted by the same company. Fortunately, I was able to get the sites back up and running simply by restarting them.
>
> Are there any services out there that I can use to automatically monitor my sites and send me an email and/or text message if my sites go down?

New Relic, Datadog, Pingdom, and lots of others have arisen recently. Additionally, you should think about having your own health check responder(s).

> Additionally, would it be a good idea to set the cron jobs on my sites to automatically restart the sites on a regular basis? If so, how often should my sites be restarted?

It often depends on why your sites went down. It also depends on what sort of infrastructure you have for your application. Some server setups can manage this if a single server processor (such as a unicorn worker) goes down or hangs, but if the whole thing goes belly up then you may have something quite a bit more catastrophic.

Reply all
Reply to author
Forward
0 new messages