I am excited to announce the publication of a PDF short cut with Addison-Wesley, part of Obie Fernandez’s awsome Professional Ruby Series: “Troubleshooting Ruby Processes: Leveraging the Unix Platform When the Usual Ruby Tricks Stop Working”
In this electronic book, I share some of my experiences troubleshooting production problems while deploying Ruby on Rails applications in the field. In the course of delivering large Ruby on Rails projects, my teammates and I at ThoughtWorks encountered complex issues that could not be resolved employing the standard Ruby tricks (i.e. raising exceptions, irb, script/console, log file, breakpointer, debugger, etc.). Often some of our Mongrel servers would hang, offering no real clue as to the exact source of the problem or how to solve it. Resolving these problems required leveraging not only my Ruby skills but also a good understanding of the underlying operating system. System tools such as lsof, strace, DTrace or gdb proved to be key to the success of our projects.
This book also provides concrete examples that illustrate how to use these tools to solve real-life problems in Ruby development. The content is not specific to Ruby on Rails and will be useful for troubleshooting problems with any Ruby process. Developing expertise in this area is key if you are developing professional Ruby applications. In this way, should your production Mongrel cluster freeze and stop serving HTTP requests, it will not take you 2 days to figure out why! ;-)