directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Johannes Zillmann <jz8_b...@yahoo.de>
Subject [MINA] OutOfMemoryError on streaming large files
Date Mon, 12 Dec 2005 10:19:11 GMT
Hello folks,

i'm sending a 83 MB file over net with help of mina.
The receiving hanlder is a StreamIoHandler, a own
thread reads from IoSessionInputStream and write the
bytes to file. 
After writing 65MB successfully to disk i've got
following exceptions:
on SocketChannelImpl.read:

java.lang.OutOfMemoryError
	at java.nio.Bits.reserveMemory(Bits.java:618)
	at
java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:95)
	at
java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:285)
	at
sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:54)
	at sun.nio.ch.IOUtil.read(IOUtil.java:205)
	at
sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:207)
	at
org.apache.mina.transport.socket.nio.support.SocketIoProcessor.read(SocketIoProcessor.java:291)
	at
org.apache.mina.transport.socket.nio.support.SocketIoProcessor.process(SocketIoProcessor.java:265)
	at
org.apache.mina.transport.socket.nio.support.SocketIoProcessor.access$4(SocketIoProcessor.java:254)
	at
org.apache.mina.transport.socket.nio.support.SocketIoProcessor$Worker.run(SocketIoProcessor.java:625)

and on SocketChannelImpl.write:
WARN
org.apache.mina.common.support.DefaultExceptionMonitor
- Unexpected exception.
java.lang.OutOfMemoryError
	at java.nio.Bits.reserveMemory(Bits.java:618)
	at
java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:95)
	at
java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:285)
	at
sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:54)
	at sun.nio.ch.IOUtil.write(IOUtil.java:69)
	at
sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:300)
	at
org.apache.mina.transport.socket.nio.support.SocketIoProcessor.doFlush(SocketIoProcessor.java:500)
	at
org.apache.mina.transport.socket.nio.support.SocketIoProcessor.doFlush(SocketIoProcessor.java:434)
	at
org.apache.mina.transport.socket.nio.support.SocketIoProcessor.access$5(SocketIoProcessor.java:395)
	at
org.apache.mina.transport.socket.nio.support.SocketIoProcessor$Worker.run(SocketIoProcessor.java:628)

Have sombody a hint for me ?
I'm using the latest 0.9 head.

cheers Johannes


	

	
		
___________________________________________________________ 
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

Mime
View raw message