Monthly Archives: November 2007

Timing out Rails from Mongrel

While we’re on the timeout tip, I’d like to talk about a fail-safe timeout for mongrel rails. We’ve talked about making sure that net/http and memcache-client behave, but what about other slow actions? Since mongrel only processes one rails request at a time, other requests can start to pile up. In rare cases, those other [...]

Posted in Extensions, Mongrel, Ruby | 2 Comments

Stack Traces in ThreadDump: So Close!

Some of you may already be familiar with ThreadDump, a tool Rapleaf has created for figuring out where all your Ruby processes’ threads are currently executing in your code. This little gem is particularly useful when your process is not responding or a server process is slow. However, one notable limitation of ThreadDump is that [...]

Posted in Miscellaneous | Leave a comment

Infinite Socket Waits

In a variety of different subsystems here at Rapleaf, we’ve noticed some peculiar behavior from the Ruby socket libraries. Under some circumstances, a blocking IO call on a socket appears to go on forever, even in the face of the underlying socket closing. Now, obviously, a blocking IO call is not expected to return until [...]

Posted in Miscellaneous | 8 Comments

Net::HTTP @open_timeout

We were recently fighting with some long-running requests hogging-up the single-threaded mongrel processes and causing requests to timeout. To be fair to mongrel, the only reason it is effectively single-threaded is because of Rails. Anyway, we were having a tough time figuring out how to determine where in our Rails code we were sitting there [...]

Posted in Mongrel, Ruby | 2 Comments
  • Rapleaf Is Hiring!

    We are looking for engineers who want to solve challenging problems.

    We have great people, do great work, and have great perks.

    Know someone who might be interested? Refer a friend and get $5,000 for successful hires.

    See our current openings at
    www.rapleaf.com/careers