This project is archived and is in readonly mode.
Connection pool timeout in production mode with AR sessions
-
Zach Holman
I can confirm this on our pre-2.3RC1 app that's now running RC1. Pretty difficult to track down, given all of our logs show normal response times as Peter indicated. We were seeing this both on Ubuntu and on OS X.
Seems like it could pose a pretty significant problem; we've moved onto a different session store in the meantime, but given the somewhat common MySQL+ActiveRecordStore combo and how opaque it is to the developer, it might be worth taking a closer look at.
-
josh
- Assigned user set to josh
- Milestone cleared.
-
Brendan Schwartz
For what it's worth, I observe this connection pool timeout behavior when running requests through mongrel (1.1.5) but everything appears to be fine when using thin (1.0.0).
-
Repository
- State changed from new to resolved
(from [1b22071b276a2a2b3e65e6db40c6a0aa92d9ebc3]) Ensure ActiveRecord session store's connections are checked in after each request [#1927 state:resolved] http://github.com/rails/rails/co...
-
Peter Nash
Thanks - that's fixed it.
-
Ryan Angilly
- Tag changed from 2.3 to 2.3, performance, rack
Hey is anyone else seeing this again? We were seeing a problem like this on our staging server for the past month (after upgrading to 2.3), but figured it might have just been our crappy staging server. We just pushed live to a much more powerful slice, and sure enough every 20-30 seconds we see requests take 4.8 - 5.3 seconds to return in curl.
Josh, could you give some insight into what this problem actually was, and how you believed you were fixing it when you committed the patch?
Thanks guys, Ryan
-
Peter Nash
Hi Ryan
I'm not seeing the problem the the 2.3.2 gem version of Rails. I've tested against the two apps where I originally saw this in production mode and all looks fine. I've not tested against Edge.
Peter.
-
Peter Nash
.... that should have been "with the 2.3.2" .....
-
Ryan Angilly
Yeah turns out we were using sql_session_store (it's a really old app) instead of active_record_store. We put AR store up on our staging slice and things seems to be behaving properly now.
Thanks for posting such a detailed description originally. The wait_timeout set to 0.5 hack gave us just enough time to figure things out.