<?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 Re: Plumbr detects memory Leak in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/plumbr-detects-memory-leak/m-p/286364#M239494</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Axel, I agree it is a big permGen but it sill fills up. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The report I have above is as detailed as it gets.&amp;nbsp; I use mysql as my authentication source with the plugin. I believe there is an issue here.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I did find something interesting.&amp;nbsp; Once I start alfresco I connect with visualVM and there are about 25,000 classes loaded.&amp;nbsp; I then run some test scripts that search and then get content.&amp;nbsp; If I use the admin account, which is in the alfresco database, then the class number stays the same.&amp;nbsp; However, when I run the same script to test with users from my sql auth database, the classes start going up really quickly.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course as that class number goes up, my permGen use goes up.&amp;nbsp; So it seems there is a problem with the way the plugin is used. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am looking into that now.&amp;nbsp; Any ideas about that? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Sep 2013 13:53:45 GMT</pubDate>
    <dc:creator>sleeper</dc:creator>
    <dc:date>2013-09-10T13:53:45Z</dc:date>
    <item>
      <title>Plumbr detects memory Leak</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/plumbr-detects-memory-leak/m-p/286362#M239492</link>
      <description>I have been having problems running out of permgen space.&amp;nbsp; My maxPermSize is set to 1G and I have to restart the server about once a month because I run out of permgen space. So I attached plumbr to the JVM and it says that it found a memory leak. &amp;lt;report&amp;gt;Currently 121618 leaked objects exist</description>
      <pubDate>Mon, 09 Sep 2013 14:43:09 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/plumbr-detects-memory-leak/m-p/286362#M239492</guid>
      <dc:creator>sleeper</dc:creator>
      <dc:date>2013-09-09T14:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbr detects memory Leak</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/plumbr-detects-memory-leak/m-p/286363#M239493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;120 k HashEntry instances don't seem too problematic - keep in mind that EhCache is used to keep some elements, which may be used often and may be expensive to fetch in memory to speed up the general application. The HashEntry instances are "just" data structure elements that make up the cache and depending on how many objects are maintained, they can quickly add up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Are there any other suspect instance types in the report output? Usually, when there is a memory leak, you can drill it down to some type of complex Alfresco object which claims a lot of memory with just a limited amount of instances through containment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, the PermGen is usually the least affected by leaked objects which reside on the Heap. PermGen is used for class objects, compiled code and internalized Strings. Not all memory analyzers are capable of investigating into PermGen errors. An example of what can eat up your PermGen are dynamically compiled JavaScript files used by the Rhino engine. To find out you need to obtain a list of loaded classes from your environment / memory dump.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1G is a very extreme PermGen - I usually make do with about 320 M (Repository-only Tomcat) even in long running systems.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Sep 2013 17:05:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/plumbr-detects-memory-leak/m-p/286363#M239493</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2013-09-09T17:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbr detects memory Leak</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/plumbr-detects-memory-leak/m-p/286364#M239494</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Axel, I agree it is a big permGen but it sill fills up. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The report I have above is as detailed as it gets.&amp;nbsp; I use mysql as my authentication source with the plugin. I believe there is an issue here.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I did find something interesting.&amp;nbsp; Once I start alfresco I connect with visualVM and there are about 25,000 classes loaded.&amp;nbsp; I then run some test scripts that search and then get content.&amp;nbsp; If I use the admin account, which is in the alfresco database, then the class number stays the same.&amp;nbsp; However, when I run the same script to test with users from my sql auth database, the classes start going up really quickly.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course as that class number goes up, my permGen use goes up.&amp;nbsp; So it seems there is a problem with the way the plugin is used. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am looking into that now.&amp;nbsp; Any ideas about that? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 13:53:45 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/plumbr-detects-memory-leak/m-p/286364#M239494</guid>
      <dc:creator>sleeper</dc:creator>
      <dc:date>2013-09-10T13:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbr detects memory Leak</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/plumbr-detects-memory-leak/m-p/286365#M239495</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am still having problems with this. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I started the JVM and had it list all the classes loaded. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Every time I make even a simple request, these classes get loaded and I don’t see why they get loaded every time &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[Loaded sun.reflect.GeneratedConstructorAccessor241 from __JVM_DefineClass__]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[Loaded sun.reflect.GeneratedConstructorAccessor242 from __JVM_DefineClass__]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[Loaded sun.reflect.GeneratedConstructorAccessor243 from __JVM_DefineClass__]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[Loaded sun.reflect.GeneratedConstructorAccessor244 from __JVM_DefineClass__]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[Loaded org.mozilla.javascript.gen.workspace___SpacesStore_Company_Home_Data_Dictionary_Web_Scripts_Extensions_10 from file:/var/local/cms/server/tomcat/webapps/alfresco/WEB-INF/lib/js.jar]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[Loaded org.mozilla.javascript.gen.workspace___SpacesStore_Company_Home_Data_Dictionary_Web_Scripts_Extensions_11 from file:/var/local/cms/server/tomcat/webapps/alfresco/WEB-INF/lib/js.jar]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[Loaded org.mozilla.javascript.gen.workspace___SpacesStore_Company_Home_Data_Dictionary_Web_Scripts_Extensions_12 from file:/var/local/cms/server/tomcat/webapps/alfresco/WEB-INF/lib/js.jar]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Why does it load a new class for the ftl output? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks. &lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Sep 2013 05:52:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/plumbr-detects-memory-leak/m-p/286365#M239495</guid>
      <dc:creator>sleeper</dc:creator>
      <dc:date>2013-09-13T05:52:00Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbr detects memory Leak</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/plumbr-detects-memory-leak/m-p/286366#M239496</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't believe it is loading these classes for FTL output but for actual web script logic (JavaScript controller). This is Rhino script compiling which is known to create memory problems when compiling dynamic strings (which a script inside the Data Dictionary basically is considered to be since it can change at any time), see&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;ul&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;li&amp;gt;&lt;/SPAN&gt;&lt;A href="https://bugzilla.mozilla.org/show_bug.cgi?id=49205" rel="nofollow noopener noreferrer"&gt;https://bugzilla.mozilla.org/show_bug.cgi?id=49205&lt;/A&gt;&lt;SPAN&gt;&amp;lt;/li&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;li&amp;gt;&lt;/SPAN&gt;&lt;A href="https://bugzilla.mozilla.org/show_bug.cgi?id=243305" rel="nofollow noopener noreferrer"&gt;https://bugzilla.mozilla.org/show_bug.cgi?id=243305&lt;/A&gt;&lt;SPAN&gt;&amp;lt;/li&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;li&amp;gt;&lt;/SPAN&gt;&lt;A href="https://bugzilla.mozilla.org/show_bug.cgi?id=49925" rel="nofollow noopener noreferrer"&gt;https://bugzilla.mozilla.org/show_bug.cgi?id=49925&lt;/A&gt;&lt;SPAN&gt;&amp;lt;/li&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/ul&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The simplest way to avoid this is to set the Rhino script processor to not optimize JavaScript files too much. By default, Alfresco should not use an aggressive optimization level - it does not specify the optimization level which defaults to -1 for "no optimizations" / "no class generation".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you or any of the addons you have installed changed anything within the RhinoScriptProcessor?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2013 08:42:43 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/plumbr-detects-memory-leak/m-p/286366#M239496</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2013-09-16T08:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbr detects memory Leak</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/plumbr-detects-memory-leak/m-p/286367#M239497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay I will buy that.&amp;nbsp; It is loading from the js.jar file and that is rhino.&amp;nbsp; I don’t think I have any third party’s installed.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I downloaded the lated Rhino js.jar and I have the same issue.&amp;nbsp; It just keeps loading the ftl and incrementing the number at the end. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you tell me where the Rhino stuff is configured?&amp;nbsp; I have not been able to find an configuration that refers to rhino. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Sep 2013 22:48:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/plumbr-detects-memory-leak/m-p/286367#M239497</guid>
      <dc:creator>sleeper</dc:creator>
      <dc:date>2013-09-16T22:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbr detects memory Leak</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/plumbr-detects-memory-leak/m-p/286368#M239498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was not able to find where in the alfresco code to set the Optimization Level, So I edited the Rhino function for compile to just always set the optimization to -1 but it still seem to be adding the classes for every output.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would think that would mean that is is always set now since it is set in the function no matter what else tries to set it, it should be what I want it to be. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 18:16:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/plumbr-detects-memory-leak/m-p/286368#M239498</guid>
      <dc:creator>sleeper</dc:creator>
      <dc:date>2013-09-18T18:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbr detects memory Leak</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/plumbr-detects-memory-leak/m-p/286369#M239499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Okay so from what I have learned I would agree with you. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have done everything I can to get Rhino to not load the script as a class.&amp;nbsp; I have change the Rhino jar so that so matter what you set the optimization is -1.&amp;nbsp; I have also gone into the RhinoScriptProcessor.java&amp;nbsp; file and set the optimization to -1 for anything that was cx. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;so all the compileScript calls I could fine have been been set to -1. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But still every time I make a call with an ftl output, it loads a class.&amp;nbsp; Do you have any ideas about where else I could look that cause the same issue? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Sep 2013 03:05:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/plumbr-detects-memory-leak/m-p/286369#M239499</guid>
      <dc:creator>sleeper</dc:creator>
      <dc:date>2013-09-23T03:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: Plumbr detects memory Leak</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/plumbr-detects-memory-leak/m-p/286370#M239500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know why you have added a custom js.jar into Alfresco - there should only be a rhino-js-16R7.jar in there. You should not need to modify any Rhino code. The modification in RhinoScriptProcessor about setting optimization level to -1 should be enough and only needs to be made in the blocks where cx.compileXXX is called.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If your web scripts from the web scripts extension are meant to be long term web scripts you could also move them from the Repository onto the classpath to avoid compiled scripts being uncacheable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Axel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Sep 2013 09:54:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/plumbr-detects-memory-leak/m-p/286370#M239500</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2013-09-24T09:54:37Z</dc:date>
    </item>
  </channel>
</rss>

