AnsweredAssumed Answered

Persistent URL tickets disappearing

Question asked by rien0700 on Jan 17, 2013
Latest reply on Jan 23, 2013 by rien0700
I'm running Alfresco Community 4.0.d and a few months ago I noticed a kind of obscure bug when using disk persistent tickets in org.alfresco.cache.ticketsCache.

I'm also using Moodle 2.2 and that is where I need the persistent tickets to be able to include and access files from alfresco. If you don't know what I mean, this is the way work material is accessed from alfresco:

…/alfresco/download/direct/workspace/SpacesStore/4bdb915f-4343-41ba-b7df-80ef100afbdb/testing.png?ticket=TICKET_334ee0e343f70f8ee2adcf03938d13af6e4f62f2

Please notice the ticket that is appended.


The bug appears very infrequently and is hard to trigger. What happens is that in some rare cases some of the tickets disappear. It's only a few tickets, maybe 1 or 2 that disappears from the ticket cache. I don't know if it is the latest or the oldest tickets that vanish. I have compared the ticket cache in tomcat/temp/org.alfresco.cache.ticketsCache.data and I have seen that they actually do disappear.


However I have managed to trigger the bug by restarting the server several times in a row and during each of the startups I logged in to alfresco via Moodle and included files with new tickets. Everything is fine so far, to trigger the bug I restart the server and it could take anything from 3 - 20 restarts before the bug appeared, i.e. tickets disappeared from the cache.


My guess is that there is a shy bug somewhere in the classes related to ticketsCache :)
Anyone with deep insight into those classes might be able to figure out what it is all about.

Any ideas?



————————-
My Alfresco settings:

I override the EHCache defaults by moving ehcache-custom.xml here:
alfresco-4.0.d/tomcat/shared/classes/alfresco/extension/ehcache-custom.xml

And then I configure ticketsCache like this:

        name="org.alfresco.cache.ticketsCache"
        maxElementsInMemory="10000"
        eternal="true"
        overflowToDisk="true"
        diskPersistent="true"
        statistics="false"

I have tried different settings without any success.

Is there an upgraded cache module in Alfresco 4.2? I was thinking of upgrading to Alfresco Community 4.2 but then I read this:
https://forums.alfresco.com/en/viewtopic.php?f=14&t=47375

Outcomes