> After a period of time (few hours / a day), the site stops responding. 
> I've tracked down the issue to activerecord. Pages that don't do a db 
> query via AR respond fine.
>
> What could be hanging activerecord? A threading issue? A db connection 
> issue?

Active Record is not thread safe. So if Cerise uses threads to handle 
incoming connections that could indeed be your problem. The same issue 
arises with WEBrick. Active Record is predominately targetted at 
CGI/FCGI/mod_ruby environments where threading is not an issue.

> FYI, I'm currently calling ActiveRecord::Base.establish_connection on 
> a file which is required by each page handler. Is this the appropriate 
> way to do it?

Each call to establish_connection will create a new database 
connection. So if at all possible, you should try to minimize the 
number of calls. In FCGI that would be to have the establish_connection 
call outside of the each_cgi block. I'm not sure how it works with 
Cerise.
--
David Heinemeier Hansson,
http://www.instiki.org/      -- A No-Step-Three Wiki in Ruby
http://www.basecamphq.com/   -- Web-based Project Management
http://www.loudthinking.com/ -- Broadcasting Brain
http://www.nextangle.com/    -- Development & Consulting Services