Keep the Train on Track in Rails

Posted on October 27, 2005, under Web Dev/Tech.

If you play with Ruby on Rails, TextDrive has a post about “Optimizing Rails Resource Usage“:

Rails is nuclear stuff, it allows you to do wonders in minutes but you have to be careful with it. The amount of magic contained in Rails imposes quite an overhead – that you, as a developer, are obliged to manage. These things not only make your application faster, scalable and tolerant, but also bearable for people living on the same web and application servers. Failures to do this in a shared heteregenous environment certifably leads to memory leaks and hard crashes.

The article goes into detail on the following 10 tips for your Rails installation:

  1. Minimize the amount of FCGI listeners
  2. Use caching
  3. NEVER run “development” on FastCGI for more than 1-2 hours
  4. Observe your memory consumption
  5. Rotate your logs
  6. Write and run unit tests
  7. Check for memory leaks when you are developing
  8. Be careful with iterations
  9. Watch the Rails TRAC for bug reports
  10. Be vigilant when restarting your server

Leave a Comment