OutOfMemoryException using ChunkedWriteHandler

nollie jon_whitmore at sra.com
Wed Mar 31 14:19:21 EDT 2010


After running my prototype a zillion times, I got these messages written to
stderr a few seconds apart.

Exception in thread "pool-8-thread-1" java.lang.OutOfMemoryError: Java heap
space
Exception in thread "pool-11-thread-1" java.lang.OutOfMemoryError: Java heap
space
Exception in thread "pool-12-thread-1" java.lang.OutOfMemoryError: Java heap
space

After the third one, both the client and the server hung and did not notice
the idle state and quit.  The server was just starting to send a 1GB file.

I've been reading the forums and I know I should check channel.isWritable()
if I'm doing something custom and that I should be using ChunkedWriteHandler
to avoid the issue entirely.  As I started with the static file server
example code I'm already using ChunkedWriteHandler so I'm not sure what's
going on.

The error occurred when I was running my unit tests locally (client and
server on the same machine) from within IDEA.  I have run those tests for a
couple weeks without this issue, so I'm not sure how to recreate the issue. 
If anyone has ideas on how to try and recreate the error in a meaningful way
and communicate the results I'd be happy to try.  

   Jon

-- 
View this message in context: http://n2.nabble.com/OutOfMemoryException-using-ChunkedWriteHandler-tp4832602p4832602.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list