alfresco.cache.immutableEntityTransactionalCache 有什么问题?

What is wrong with alfresco.cache.immutableEntityTransactionalCache?

我的日志中有这个:

2016-01-07 12:22:38,720  WARN  [alfresco.cache.immutableEntityTransactionalCache] [http-apr-8080-exec-5] Transactional update cache 'org.alfresco.cache.immutableEntityTransactionalCache' is full (10000).

而且我不想只是增加 this parameter 而不知道真正发生了什么,也不想更好地了解露天缓存的最佳实践!

仅供参考: 当我列出站点中文档库根文件夹中的元素时出现警告。请注意,该站点在该级别确实有 ~300 docs/folder,其中一些涉及当前工作流程,我在一次调用中获得所有这些(客户端分页)

我正在使用 Alfresco CE 4.2.c 实例,节点数约为 8k

每当您进行 "big" 交易时,我都会在我的日志中看到这一点。我的意思是批量更改 100 多个文件。

引用 :

The performance degredation is the reason that log message is a warning. When the transactional cache size is reached, the cache handling can no longer handle the transaction commit properly and before any stale / incorrect data is put into the shared cache, it will actually empty out the entire shared cache. The next transaction(s) will suffer bad performance due to cache misses...


Cache influence on Xmx depends on what the cache does unfortunately. The property value cache should have little impact since it stores granular values, but the node property cache would have quite a different impact as it stores the entire property map. I only have hard experience data from node cache changes and for that we calculated additional need of 3 GiB for an increase to four-times the standard cache size

收到这些警告很常见。 我不认为更改默认设置是个好主意。 如果可能的话,您可能可以尝试更改代码。

正如一位 Alfresco 工程师在 this link to the alfresco forum 中所述,Alfresco 建议的值为 "sane"。它们旨在在标准情况下正常工作。

您可以决定更改它们,但您必须小心,因为与什么都不做相比,您获得的性能可能会更低。

我建议调查为什么您使用此 webscript 会导致缓存溢出,并检查您是否可以对此采取措施。你同时检索300个documents/folders,很可能是这个原因。

在以下文章中,您可以了解如何排查和解决缓存问题。

Alfresco cache tuning

如那篇文章所述,我建议提高 ehcache 的日志级别:

org.alfresco.repo.cache.EhCacheTracerJob=调试

或者有选择地添加要监控的缓存的名称。