title: ActiveRecord appears to leak memory when connecting to multiple databases
body: <p>I have a Rails app that downloads a SQLite database on request, saves it a a <code>TempFile</code> and connects to it using <code>ActiveRecord::Base.establish_connection</code>. All the app does is return the entire database as JSON (database is about 10 MB in size). After each request, I explicitly call <code>ActiveRecord::Base.connection.disconnect!</code>. After each request to my app (on my dev box) I noticed that the amount of memory used by the app appears to be ever increasing. How can I stop this from happining?</p>
  
  <p>Just for some numbers:</p>
  
  <p>When I started my app, each worker was using about 100-200m of memory. After less than 100 requests (each request pulls the same DB), each worker is using 500m. I've seen this grow to about 700m each, at which point I have to kill the server because my desktop lags too much. </p>