The Old Blog Archive, 2005-2009

sqlite3 bombed in Rails 1.2.2

Lately I have found the an app under Rails 1.2.2 bombed every now and then, and I thought the culprit was Mongrel.

Turned out that the error was “too many open files” and the culprit was the sqlite3 connector. This ticket explains the reason, but this patch didn’t seem to go into the 1.2.2 (even though it’s fixed before the 1.2.2 release date). The resolution is either switching to Edge just for that (and starting living on the edge…) or patching it on your own. Just follow the ticket’s diff and everything’s back to normal.

I wouldn’t have been able to found that without using the UNIX tool lsof. Apparently some knowledge on the UNIX utils can definitely save your day when in need.

Comments are closed.