Status/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Stephen Baker / Stephen Baker (Stephen Baker)
Created: 02/27/2015
Components: Caching
Versions: 10.0
Failure Type: Crash
Found In Build/Fixed In Build: Final / 299865
Priority/Frequency: Major / Some users will encounter
Locale/System: English / Win 2008 Server R2 64 bit
Vote Count: 3
Problem Description:
When running cfcache on a site with a lot of concurrent traffic, it occasionally fails with an exception.
See other people's experience with the error at http://stackoverflow.com/questions/27412484/cache-already-exists-error-with-cfcache
Steps to Reproduce:
There is a code sample on the linked stackoverflow page. In my case I had cfcache surrounding a code block, with memory storage.
Concurrent execution of the page is required. The problem is a race condition so it's not always easy to produce.
Actual Result:
Message Cache erms_vuiTEMPLATE already exists
StackTrace net.sf.ehcache.ObjectExistsException: Cache erms_vuiTEMPLATE already exists at net.sf.ehcache.CacheManager.addCache(CacheManager.java:1171) at coldfusion.tagext.io.cache.ehcache.GenericEhcache.createCache(GenericEhcache.java:516) at
... (snipped for character count limit)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)
Expected Result:
Either there should be 1 cache miss and the other execution waits for the cache to be filled in, or two cache misses and both generate the content but only one is stored. Either way no crash.
Any Workarounds:
Surround <CFCACHE> with <CFLOCK type="exclusive">. Obviously this is heavy handed and harms performance more than necessary on multicore machines.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3946143
External Customer Info:
External Company:
External Customer Name: Stephen
External Customer Email:
External Test Config: My Hardware and Environment details:
ColdFusion 10 Enterprise update 15.
Windows 2008 R2 64bit
Attachments:
- September 29, 2015 00:00:00: 1_2015-04-14-2300-web_server_fetches_only.txt
Comments: