Quick Checklist for a Rails application in production

December 17, 2006

This checklist has been compiled by my recent experience and things I did not do and caused me to run into issues.

  1. DO NOT have ruby logger rotate itself. In a clustered environment all instances will try and rotate the log at once. One will win and stay alive all others will crap out. Have an external program manage the logs for you.
  2. If using capistrano change the svn setting from checkout to export:
    set :checkout, “export”
    This is for security reasons because there is extra details in the .svn metadata in a checkout opposed to an export.
  3. Set the ActiveRecord database verification timeout:ActiveRecord::Base.verification_timeout = 14400Place this in your environment.rb right after the end of Rails::Initializer.run. This should be seet lower then interactive_timeout for your database. In a mysql prompt you can type
    SHOW VARIABLES;
    to find the value. In mine it was set to 28800.
  4. Create a maintenance page. This is easily managed thru capistrano and in my situation allowed me to direct all traffic to the maintenance page while I left the server running and debugged it locally. It will come in handy.
  5. Use the Exception Notifier plugin and clean up the 404 and 500 html files in the public dir. The plugin uses them and sends you the error in an email.
  6. CAPTURE DATA! I am going back and modifying several tables to capture more data. Rails convenient created_on and other helpers are excellent, use them. You can never collect too much data, we are in the information age.
Advertisements

2 Responses to “Quick Checklist for a Rails application in production”

  1. telepwdr Says:

    matt. hello from your t9ing on I 70 buddy 🙂

  2. Inherently Says:

    Somehow i missed the point. Probably lost in translation 🙂 Anyway … nice blog to visit.

    cheers, Inherently
    .


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: