How to increase cache to avoid a memory leak

cancel
Showing results for 
Search instead for 
Did you mean: 
mirak
Active Member

How to increase cache to avoid a memory leak

Hello, 

I have following error messages in the alfresco log. I tried to edit tomcat/conf/context.xml (<Resources cachingAllowed="true" cacheMaxSize="100000"/>), but the result is the same.

How can I increase the cache?

Thank you!

28-Jul-2021 14:29:08.118 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@1f567bce]) and a value of type [org.alfresco.repo.web.scripts.RepositoryImageResolver$1] (value [org.alfresco.repo.web.scripts.RepositoryImageResolver$1@17d88b0a]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
28-Jul-2021 14:29:08.118 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal.SuppliedThreadLocal] (value [java.lang.ThreadLocal$SuppliedThreadLocal@64f206e]) and a value of type [org.alfresco.util.transaction.TransactionSupportUtil.ResourcesHolder] (value [org.alfresco.util.transaction.TransactionSupportUtil$ResourcesHolder@5db08062]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
28-Jul-2021 14:29:08.118 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@59e338a0]) and a value of type [org.alfresco.repo.web.scripts.RepositoryImageResolver$1] (value [org.alfresco.repo.web.scripts.RepositoryImageResolver$1@17d88b0a]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
28-Jul-2021 14:29:08.118 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal.SuppliedThreadLocal] (value [java.lang.ThreadLocal$SuppliedThreadLocal@4df69712]) and a value of type [org.alfresco.repo.content.MimetypeMap.Data] (value [(mimetypes: 201 from XML: 201 from JSON: 0 files: 0)]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
28-Jul-2021 14:29:08.118 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@707f19ed]) and a value of type [org.alfresco.repo.web.scripts.RepositoryImageResolver$1] (value [org.alfresco.repo.web.scripts.RepositoryImageResolver$1@17d88b0a]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
28-Jul-2021 14:29:08.118 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@44291cd9]) and a value of type [org.alfresco.repo.web.scripts.RepositoryImageResolver$1] (value [org.alfresco.repo.web.scripts.RepositoryImageResolver$1@17d88b0a]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
28-Jul-2021 14:29:08.119 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@57cacb6]) and a value of type [org.alfresco.repo.web.scripts.RepositoryImageResolver$1] (value [org.alfresco.repo.web.scripts.RepositoryImageResolver$1@17d88b0a]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
28-Jul-2021 14:29:08.119 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@687408b2]) and a value of type [org.alfresco.repo.web.scripts.RepositoryImageResolver$1] (value [org.alfresco.repo.web.scripts.RepositoryImageResolver$1@17d88b0a]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
28-Jul-2021 14:29:08.119 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@7ab4ccb5]) and a value of type [org.alfresco.repo.web.scripts.RepositoryImageResolver$1] (value [org.alfresco.repo.web.scripts.RepositoryImageResolver$1@17d88b0a]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
28-Jul-2021 14:29:08.119 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@16af049f]) and a value of type [org.alfresco.repo.web.scripts.RepositoryImageResolver$1] (value [org.alfresco.repo.web.scripts.RepositoryImageResolver$1@17d88b0a]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
28-Jul-2021 14:29:08.119 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal.SuppliedThreadLocal] (value [java.lang.ThreadLocal$SuppliedThreadLocal@2ae22b8d]) and a value of type [org.alfresco.util.CachingDateFormat] (value [yyyy-MM-dd]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
28-Jul-2021 14:29:08.119 SEVERE [main] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [alfresco] created a ThreadLocal with key of type [org.alfresco.repo.content.transform.TransformerDebug$ThreadInfo$1] (value [org.alfresco.repo.content.transform.TransformerDebug$ThreadInfo$1@2e9b7f13]) and a value of type [org.alfresco.repo.content.transform.TransformerDebug.ThreadInfo] (value [org.alfresco.repo.content.transform.TransformerDebug$ThreadInfo@233c54b2]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
...
Heap
par new generation total 613440K, used 351518K [0x0000000580000000, 0x00000005a9990000, 0x00000005a9990000)
eden space 545344K, 61% used [0x0000000580000000, 0x00000005946734a8, 0x00000005a1490000)
from space 68096K, 25% used [0x00000005a1490000, 0x00000005a25644b0, 0x00000005a5710000)
to space 68096K, 0% used [0x00000005a5710000, 0x00000005a5710000, 0x00000005a9990000)
concurrent mark-sweep generation total 1886568K, used 1196519K [0x00000005a9990000, 0x000000061cbea000, 0x0000000800000000)
Metaspace used 222390K, capacity 229530K, committed 229816K, reserved 722944K
class space used 23133K, capacity 25104K, committed 25120K, reserved 516096K

 

5 Replies
abhinavmishra14
Advanced

Re: How to increase cache to avoid a memory leak

This error is usually seen when acs stops abruptly for some any reasons. This can be ignored.

Checkout this post as well: https://backstage.forgerock.com/knowledge/kb/article/a55893580

I don't think the config you are updating has anything to do with it, at last i am not aware for sure. But if you wish to updatet the resource cache, the right place for that is: $TOMCAT_HOME/conf/Catalina/localhost/alfresco.xml and $TOMCAT_HOME/conf/Catalina/localhost/share.xml

example:

<Context crossContext="true">
  <Resources cachingAllowed="true" cacheMaxSize="100000">
    <PostResources base="${catalina.base}/../modules/platform"
                   className="org.apache.catalina.webresources.DirResourceSet"
                   webAppMount="/WEB-INF/lib"/>
  </Resources>
</Context>
~Abhinav
(ACSCE, AWS SAA, GAIQ)
michaelzietlow
Active Member II

Re: How to increase cache to avoid a memory leak

Had a similar issue last month with my Community7.0 ansible installation.

Discussed here:
https://hub.alfresco.com/t5/alfresco-content-services-forum/insufficient-free-space-available-after-...

 

abhinavmishra14
Advanced

Re: How to increase cache to avoid a memory leak

@Matthew52 seems you are here to spam and not for real solutions. 

~Abhinav
(ACSCE, AWS SAA, GAIQ)
EddieMay
Community Manager
Community Manager

Re: How to increase cache to avoid a memory leak

Hi @Horner154 

Is your issue exactly the same? Providing logs, config files, etc, would be helpful.

Cheers,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!
abhinavmishra14
Advanced

Re: How to increase cache to avoid a memory leak


@Horner154 wrote:

I also have this same question and i cannot find any proper answers on the internet and also here.


@Horner154 Posting spam is not allowed as per the forum rules. Your posts will be marked spam and you will be banned from the forum.

~Abhinav
(ACSCE, AWS SAA, GAIQ)