This project is archived and is in readonly mode.
[patch] Add a method to MemCacheStore to reset the connection to memcached
Reported by Eric Entin | June 17th, 2009 @ 03:28 PM | in 3.x
When you're using Phusion Passenger's smart spawning mode, file descriptors get shared between all of the new processes. This means that you have to close and re-open any persistent connections (such as memcached) that your Rails app has. If you are using Rails' integrated cache, this is difficult without either monkey-patching ActiveSupport::Cache::MemCacheStore or using instance_variable_get. I don't think either of those are clean solutions so I created this patch, which is literally three lines of code. I didn't include a test for the method because the stats and clear methods of MemCacheStore aren't tested either, and this one's along the same lines. Let me know if I missed anything!
Comments and changes to this ticket
-
Eric Entin June 17th, 2009 @ 06:37 PM
- Tag set to cache, patch
-
Dan Pickett May 9th, 2010 @ 07:26 PM
- Tag changed from cache, patch to bugmash, cache, patch
-
Joel Watson July 18th, 2010 @ 02:35 AM
- Importance changed from to
+1
Would be nice if we could get this backported to a 2.3.x release. It's pretty lame that you have to work around this by either monkeypatching MemCacheStore or doing some nasty hackery.
-
Santiago Pastorino February 2nd, 2011 @ 04:51 PM
- State changed from new to open
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino February 2nd, 2011 @ 04:51 PM
- State changed from open to stale
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>