[ 
https://issues.apache.org/activemq/browse/SM-1631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46409#action_46409
 ] 

Guillaume Nodet commented on SM-1631:
-------------------------------------

I've just done a quick analysis using a memory profile and found the following:

{code}
         char[5144574]                                                          
                                                                                
10,289,160      
                 value of  java.lang.StringBuffer                               
                                                                                
16      
                         buf of  java.io.StringWriter                           
                                                                                
24      
                                 m_writer of  
org.apache.xml.serializer.ToXMLStream                                           
                  128     
                                         m_serializer of  
org.apache.xalan.transformer.TransformerIdentityImpl                  64      
                                                 fLexicalHandler of  
org.apache.xerces.parsers.SAXParser                                        88   
   
                                                         value of  
java.lang.ThreadLocal$ThreadLocalMap$Entry                           32      
                                                                 [13] of  
java.lang.ThreadLocal$ThreadLocalMap$Entry[17]                        80      
                                                                         table 
of  java.lang.ThreadLocal$ThreadLocalMap                         24      
                                                                                
 threadLocals of  java.lang.Thread [Stack Local, Thread]        96      
{code}

I don't think these objects are actually leaking and they are stored in a 
thread-local and should be reused across invocations.  However, they eat a lot 
of memory and we might want to ensure that they are released and garbaged if 
possible.   I don't have any allocation information to track where these 
objects are allocated from so I'm not sure we can do anything about those right 
now.

Anyway, I think we should lower the priority of this issue as this is not a 
memory leak i think.

Btw, if you shut down the EIP component, you'll see the memory decrease to its 
original value.

> Memory leak while using eip component (wiretab, static recipient)
> -----------------------------------------------------------------
>
>                 Key: SM-1631
>                 URL: https://issues.apache.org/activemq/browse/SM-1631
>             Project: ServiceMix
>          Issue Type: Bug
>    Affects Versions: servicemix-eip-2008.01
>            Reporter: Steffen Rumpf
>            Priority: Blocker
>         Attachments: FileToThreeFiles.png, servicemix-bean-test.zip, 
> servicemix-memory-leak.png, servicemix-memory-leak.zip
>
>
> I am using a eip-component (tested both static recipient and wiretab) and 
> received a memory leak while processing messages. There is a simple testcase 
> for this, when receiving a file and send it via eip to more then one file 
> sender there is a remaining amount of heap which is not cleared by gc (even 
> when I trigger the gc by hand).
> Related threads:
> http://www.nabble.com/Best-practices%2C-working-with-beans-and-huge-messages.-tt19914439ef12049.html
> http://www.nabble.com/Memory-issue-in-servicemix-tt19727632ef12049.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to