Unless specified, ActiveRecord fires up 4 default connections.
I've noticed if I reload a simple page, which makes at least one ActiveRecord call, 4 times every thing functions normal. However, on the fifth time, it hangs for almost 5 seconds. So, every 5th page load it hangs for 5 seconds.
I upped the default connection pool in my adapter to 8 and now it hangs every 9th page request. It seems like it doesn't reuse connections but instead kills them and regenerates them once the pool limit is reached.
I'm not actually using ActiveRecord with entire Rails stack.
Is there a magical ActiveRecord connection flag which prevents this from happening? Or, is there something else going wrong?
Hot damn that was easy...
Sure wish this was something you could configure so you don't have to call it every time.