You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2009/06/07 10:00:14 UTC

[jira] Closed: (DIRMINA-320) Unexpected OutOfMemoryError exception in SocketConnectorIoProcessor

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

Emmanuel Lecharny closed DIRMINA-320.
-------------------------------------


> Unexpected OutOfMemoryError exception in SocketConnectorIoProcessor
> -------------------------------------------------------------------
>
>                 Key: DIRMINA-320
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-320
>             Project: MINA
>          Issue Type: Bug
>          Components: Transport
>    Affects Versions: 1.0.0
>         Environment: Mac OS X, Java 1.5.0_06
>            Reporter: Matthew Phillips
>            Assignee: Trustin Lee
>
> I'm not totally sure that this is a bug, but it's certainly a problem in that the error is partially hidden by being sent to the logger and not the exceptionCaught() method and seems to leave MINA in an unusable state.
> The scenario is that I'm running some memory load tests by having a client fire lots of large messages at a server, and I occasionally see the sort of exception below appear on the client's console (the client is also MINA-based). It appears the heap is being blown and not being handled very gracefully. The client that sees this happen does not shut down cleanly, possibly because it's no longer able to send/receive the messages needed by my protocol to close the session.
> The main problem is that the client has no idea this has happened and cannot take any action, it just fails ungracefully.
> 10822 [SocketConnectorIoProcessor-2.0] WARN org.apache.mina.common.support.DefaultExceptionMonitor - Unexpected exception.
> java.lang.OutOfMemoryError: Direct buffer memory
> 	at java.nio.Bits.reserveMemory(Bits.java:633)
> 	at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:95)
> 	at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
> 	at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:56)
> 	at sun.nio.ch.IOUtil.write(IOUtil.java:69)
> 	at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:302)
> 	at org.apache.mina.transport.socket.nio.SocketIoProcessor.doFlush(SocketIoProcessor.java:482)
> 	at org.apache.mina.transport.socket.nio.SocketIoProcessor.doFlush(SocketIoProcessor.java:414)
> 	at org.apache.mina.transport.socket.nio.SocketIoProcessor.access$600(SocketIoProcessor.java:44)
> 	at org.apache.mina.transport.socket.nio.SocketIoProcessor$Worker.run(SocketIoProcessor.java:567)
> 	at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:43)
> 	at java.lang.Thread.run(Thread.java:613)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.