<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RepositoryQuerySession Memory Leak in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/repositoryquerysession-memory-leak/m-p/36540#M15405</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, I'm running a v4.2.0 on a Tomcat 7.0.64 with 1GB of max Heap space.&lt;/P&gt;&lt;P&gt;I've no problems for years, but in last weeks it ran in out of memory almost once a day.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I took some heap dump and made some tests, and I found the class resposible of memory retention:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;org.alfresco.repo.webservice.repository.RepositoryQuerySession&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;Every time a document is saved in Alfresco by a thirdparty software (via WS), two new instances of&amp;nbsp;&lt;SPAN&gt;RepositoryQuerySession are created in memory, and never removed.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;&lt;SPAN&gt;And these objects retains op to 5MB each.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;&lt;SPAN&gt;GC is called but they stay there.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;&lt;SPAN&gt;The problem does not apper when documents are uploaded throgh Alfresco web interface.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;&lt;SPAN&gt;Unfortunatly I've no acces on that thirdparty sotware.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5; font-size: 14px;"&gt;&lt;SPAN&gt;So what could keep alive these&amp;nbsp;&lt;SPAN style="background-color: #f5f5f5;"&gt;RepositoryQuerySession objects?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Oct 2017 19:44:33 GMT</pubDate>
    <dc:creator>davidefonta</dc:creator>
    <dc:date>2017-10-20T19:44:33Z</dc:date>
    <item>
      <title>RepositoryQuerySession Memory Leak</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/repositoryquerysession-memory-leak/m-p/36540#M15405</link>
      <description>Hi, I'm running a v4.2.0 on a Tomcat 7.0.64 with 1GB of max Heap space.I've no problems for years, but in last weeks it ran in out of memory almost once a day.I took some heap dump and made some tests, and I found the class resposible of memory retention&lt;IMG id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;rg.alfresco.repo.webservice.repository.Repos</description>
      <pubDate>Fri, 20 Oct 2017 19:44:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/repositoryquerysession-memory-leak/m-p/36540#M15405</guid>
      <dc:creator>davidefonta</dc:creator>
      <dc:date>2017-10-20T19:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: RepositoryQuerySession Memory Leak</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/repositoryquerysession-memory-leak/m-p/36541#M15406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instances of&amp;nbsp;&lt;SPAN style="color: #333333; background-color: #f5f5f5;"&gt;RepositoryQuerySession&lt;SPAN&gt;&amp;nbsp;are retained within the Repository 2nd-level cache named "webServicesQuerySessionSharedCache", which can be configured via the alfresco-global.properties file. By default, the cache allows up to 1000 objects to be cached. Cached objects are not cleared during GC, so it is important to correctly configure the cache sizes when using extremely little memory (1GiB max heap is extremely little for Alfresco).&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Oct 2017 09:14:14 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/repositoryquerysession-memory-leak/m-p/36541#M15406</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2017-10-23T09:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: RepositoryQuerySession Memory Leak</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/repositoryquerysession-memory-leak/m-p/36542#M15407</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Axel&lt;/P&gt;&lt;P&gt;I set&lt;/P&gt;&lt;P&gt;cache.webServicesQuerySessionSharedCache.maxItems=50&lt;/P&gt;&lt;P&gt;in my&amp;nbsp;alfresco-global.properties and it actually works: the number of&amp;nbsp;&lt;SPAN style="color: #333333; background-color: #f5f5f5;"&gt;RepositoryQuerySession instances&lt;SPAN&gt;&amp;nbsp;grows up to 50 and never&amp;nbsp;exceeds it.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One more question.&lt;/P&gt;&lt;P&gt;I tried also to set&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cache.webServicesQuerySessionSharedCache.timeToLiveSeconds=240&lt;BR /&gt;cache.webServicesQuerySessionSharedCache.maxIdleSeconds=120&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but they seems not applied.&lt;/P&gt;&lt;P&gt;After 2 or 4 mintue of inactivity, my&amp;nbsp;&lt;SPAN style="color: #333333; background-color: #f5f5f5;"&gt;RepositoryQuerySession instances are still present in heap.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; background-color: #f5f5f5;"&gt;Maybe these parameters are not supported in my alfresco version (4.2.0)?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Oct 2017 11:23:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/repositoryquerysession-memory-leak/m-p/36542#M15407</guid>
      <dc:creator>davidefonta</dc:creator>
      <dc:date>2017-10-28T11:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: RepositoryQuerySession Memory Leak</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/repositoryquerysession-memory-leak/m-p/36543#M15408</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, some configuration operations are not supported for all Alfresco versions / editions. There also is a difference if the cache in question is created as a local-only or a cluster-distributed cache in Alfresco Enterprise. In 4.2, timeToLive and maxIdle weren't used for local caches.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Oct 2017 12:37:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/repositoryquerysession-memory-leak/m-p/36543#M15408</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2017-10-28T12:37:01Z</dc:date>
    </item>
  </channel>
</rss>

