You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Martin Ritchie (JIRA)" <ji...@apache.org> on 2006/11/27 18:07:27 UTC

[jira] Updated: (DIRMINA-302) Unbounded nature of writeRequestQueue can cause OutOfMemoryException

     [ http://issues.apache.org/jira/browse/DIRMINA-302?page=all ]

Martin Ritchie updated DIRMINA-302:
-----------------------------------

    Attachment: WriteBufferLimitFilterBuilder.java

This filter is a temporary fix to the problem. It causes the write to block until the number of messages waiting to be sent is bellow the threshold (default : 5000). If this is used on a server then the session should have the ReadThrottleFilter enabled as while the mail thread is suspended waiting for the write to succeed the IOProcessor can cause a back log of read messages pushing the Out of Memory Exception somewhere else.

As commented in the Javadoc this filter should really be part of the core to allow an exception to be thrown directly on the write() call from the client. This could then be policy driven on pending messages (as this is ) or pending bytes.


> Unbounded nature of writeRequestQueue can cause OutOfMemoryException
> --------------------------------------------------------------------
>
>                 Key: DIRMINA-302
>                 URL: http://issues.apache.org/jira/browse/DIRMINA-302
>             Project: MINA
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.0
>            Reporter: Martin Ritchie
>         Attachments: WriteBufferLimitFilterBuilder.java
>
>
> As referenced in the following JIRAs:
>  DIRMINA-206 Prevent OutOfMemoryError when a server or a client is overloaded
>  DIRMINA-144 Traffic shaping filter
>  DIRMINA-262 Controlling rate of writes in Mina 0.8.2
> Raised to hightlight the problem. There are a number of approaches that have been mentioned and could be used as an approach.
> Limiting the queue to number of requests or total size. 
> Then either blocking on a write or throwing an exception.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira