[
https://issues.apache.org/jira/browse/DIRMINA-789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12878603#action_12878603
]
Sai Pullabhotla commented on DIRMINA-789:
-----------------------------------------
Well, your statements do not match up with the Javadocs. I guess, we have to do
some work on the Javadocs, unless you think I'm misinterpreting them. Below is
what the WriteRequestFilter's Java doc says:
Attaches an IoEventQueueHandler to an IoSession's WriteRequest queue to
provide accurate write queue status tracking.
The biggest difference from OrderedThreadPoolExecutor and
UnorderedThreadPoolExecutor is that IoEventQueueHandler.polled(Object, IoEvent)
is invoked when the write operation is completed by an IoProcessor,
consequently providing the accurate tracking of the write request queue status
to the IoEventQueueHandler.
Most common usage of this filter could be detecting an IoSession which writes
too fast which will cause OutOfMemoryError soon:
session.getFilterChain().addLast(
"writeThrottle",
new WriteRequestFilter(new IoEventQueueThrottle()));
The sentence I would like to highlight is -
>> Most common usage of this filter could be detecting an IoSession which
>> writes too fast which will cause OutOfMemoryError soon.
Which is what I'm trying to prevent with this filter.
> Possible Deadlock/Out of memory when sending large amounts of data using Nio
> ----------------------------------------------------------------------------
>
> Key: DIRMINA-789
> URL: https://issues.apache.org/jira/browse/DIRMINA-789
> Project: MINA
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.0-RC1
> Environment: Windows Vista 64-bit Java 5 and Java 6
> Reporter: Sai Pullabhotla
> Attachments: MinaClient.java, RandomDataServer.java
>
>
> This is a followup to the post on the DEV mailing list,
> http://old.nabble.com/Help-needed-with-OutOfMemory-error-and-or-GC-Issues-Dead-Locks-td28849756.html.
>
> I've even simplified the test cases so now it just has one simple NioServer,
> and an NioClient. The MinaClient class creates 5 concurrent connections to
> the RandomDataServer. Upon a successful connection, the server is setup to
> send 500MB worth of random text data. The MinaClient just saves the received
> data to a temp file in the working directory. When I run this code with small
> amounts of data, it works fine, but with 500MB, I did not have success yet.
> Some times, I get OOM on the server. Some times, nothing happens.
> I've declared several constants in each class that you could change to try
> various settings such as changing the amount of data served by the server,
> whether or not to use an executor filter/IoEventThrottle etc.
> Both classes have main methods, and I was running them as stand alone
> applications on the same PC.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.