title: ActiveRecord + EventMachine + Postgres + Sinatra
body: <p>I am trying to write a Sinatra app that has websockets.  My Sinatra app uses Postgres as a backend (runs perfectly without websockets).  I added <code>eventmachine</code> and <code>em-websocket</code> to give my app ws support.  Everything works great except for that after <code>x</code> number of requests, I get an ActiveRecord ConnectionPool timeout.  It seems like EventMachine is not releasing DB connections, but I have never used EM before so I am not exactly sure what to do.  What is the best way to us these four (AR + EM + PG + Sinatra) technologies together without everything going up in flames?  Ideally looking for some sort of ConnectionPool gem that will cause EM to release the DB connection at the end of the request, or something of that nature.</p>