IMAPServer leaks memory with each new connection
------------------------------------------------

                 Key: JAMES-1170
                 URL: https://issues.apache.org/jira/browse/JAMES-1170
             Project: JAMES Server
          Issue Type: Bug
    Affects Versions: 3.0-M2, 3.0-M1
            Reporter: Norman Maurer
            Assignee: Norman Maurer
            Priority: Critical
             Fix For: 3.0-M3


In ImapStreamChannelUpstreamHandler we create a new instance of 
HashedWheelTimer everytime a new connections is made. This is just plain wrong 
as this will create a new thread for every instance. Even after disconnect it 
will not "destroy" the thread and so not free up memory. From the javadocs:

http://docs.jboss.org/netty/3.2/api/org/jboss/netty/util/HashedWheelTimer.html#HashedWheelTimer%28%29
Do not create many instances.
HashedWheelTimer creates a new thread whenever it is instantiated and started. 
Therefore, you should make sure to create only one instance and share it across 
your application. One of the common mistakes, that makes your application 
unresponsive, is to create a new instance in ChannelPipelineFactory, which 
results in the creation of a new thread for every connection.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to