RoR: Best way to handle fatal errors

Assume that a fatal error has occurred during (a) initialization; or (b)
at “run time”.

(a) Let’s say a critical file or exe has gone missing during
initialization. What is the best way to report this fact?

(b) Let’s say that a disk drive has filled up … or there is a similar
problem that has not been caused by the user of one’s software. What’s
the best way to inform the administrator and the user of this fact?

Ralph S. wrote:

Assume that a fatal error has occurred during (a) initialization; or (b)
at “run time”.

(a) Let’s say a critical file or exe has gone missing during
initialization. What is the best way to report this fact?

(b) Let’s say that a disk drive has filled up … or there is a similar
problem that has not been caused by the user of one’s software. What’s
the best way to inform the administrator and the user of this fact?

Use ExceptionNotifier or similar. If the error is so severe that the
Rails app itself can’t run, use a monitoring utility such as Nagios.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

You should lookup the differences between backend and frontend server
components. Much of what you are describing will be handled throughout
different areas of your server.

Example:

Your server runs on a 1gb mem slice and you decide to go down to say a
256mb mem slice. The next day your server isn’t responding but you
investigate and find out that your server encountered memory issues.

If you were using say Phusion Passenger + Apache + Rails the rails logs
would show nothing about the mem issue and crash. Passenger may show
pipe issues but not provide a detailed response about the crash. When
you check the apache logs you’ll find the mem issue and the crash.

Basically, make sure you account for many issues across multiple
components which include rails, your frontend, and your backend server
components. Marnen suggested some ideas you can do above for one
portion. Don’t forget about the rest.

I would also visit and check out the screencasts for Scaling Rails.

http://antoniocangiano.com/2009/02/26/scaling-rails-screencasts/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs