[Building Sakai] LDAP caching

Kusnetz, Jeremy JKusnetz at APUS.EDU
Fri Dec 20 08:07:42 PST 2013


We are having an issue where when looking up LDAP users we are frequently hitting the LDAP server instead of pulling the data out of cache.

Looking at the LDAP debug logs we see that the entry is found in the cache but it's expired?  This is only after a few minutes after doing the initial lookup from the LDAP server.

2013-12-20 11:02:04,074 DEBUG ajp-bio-43049-exec-15 edu.amc.sakai.user.JLDAPDirectoryProvider - getCachedUserEntry(): cache access [found entry = true][entry expired = true]

We added to sakai.properties:
memory.edu.amc.sakai.user.JLDAPDirectoryProvider.userCache=timeToLiveSeconds=14400,timeToIdleSeconds=3600,maxElementsInMemory=20000

In the memory status tool we are seeing:
edu.amc.sakai.user.JLDAPDirectoryProvider.userCache: count:458 hits:863 misses:1076 hit%:44
[ name = edu.amc.sakai.user.JLDAPDirectoryProvider.userCache status = STATUS_ALIVE eternal = false overflowToDisk = false maxEntriesLocalHeap = 20000 maxEntriesLocalDisk = 0 memoryStoreEvictionPolicy = LRU timeToLiveSeconds = 14400 timeToIdleSeconds = 3600 diskPersistent = false diskExpiryThreadIntervalSeconds = 120 cacheEventListeners: net.sf.ehcache.statistics.LiveCacheStatisticsWrapper hitCount = 863 memoryStoreHitCount = 863 diskStoreHitCount = 0 missCountNotFound = 1076 missCountExpired = 215 maxBytesLocalHeap = 0 overflowToOffHeap = false maxBytesLocalOffHeap = 0 maxBytesLocalDisk = 0 pinned = false ]


This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20131220/329f318b/attachment.html 


More information about the sakai-dev mailing list