shwango! blog
life, love and some other stuff…

Archive for March, 2008

Bummer - server crash

Not exactly sure what caused it, but my server crashed last night around 6:15pm.

Logs just have:

Mar 5 18:13:50 [kernel] eth0: PCI Bus error 8290.
Mar 5 18:13:51 [kernel] eth1: Tx timeout - resetting

We’ve been cleaning up the server room and making some changes. One of the guys moved my box a bit and might have jiggled things just enough to cause this.

Ruby Timeout::Error

I wanted to post this before, but got busy and now I can’t find the original post about this, but anyway…

When doing network stuff in Ruby - using any Net:: libs - there’s a little trick to trap for timeouts. You can’t simply use “rescue” do handle it. The timeout error is not a subclass of the standard error, so you have to explicitly trap for it: