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.
- 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.
- 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. - 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. - 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.
- 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.
- 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.
Advertisement
December 23, 2006 at 7:56 am
matt. hello from your t9ing on I 70 buddy
June 18, 2008 at 4:27 pm
Somehow i missed the point. Probably lost in translation
Anyway … nice blog to visit.
cheers, Inherently
.