james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Norman Maurer (JIRA)" <server-...@james.apache.org>
Subject [jira] Resolved: (JAMES-1170) IMAPServer leaks memory with each new connection
Date Sun, 02 Jan 2011 19:00:57 GMT

     [ https://issues.apache.org/jira/browse/JAMES-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Norman Maurer resolved JAMES-1170.
----------------------------------

    Resolution: Fixed

fixed by sharing the same HashedWheelTimer

> 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-M1, 3.0-M2
>            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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message