We're seeing the error listed below in a production setup. The number
of nodes in the cluster is much larger than our normal dev
environment, and I wonder if this is related to the problem? There
was a thread from Nov 2k11 talking about a bug in Netty and proposed
workarounds. At that time, it looks like it was sensitive to the jdk,
kernel, etc. and was shown on Mac but not Ubuntu.
This Netty bug seems to be the problem:
https://issues.jboss.org/browse/NETTY-424
Has anybody seen or better yet fixed this?
We're running Akka 1.2 at the moment with Netty 3.2.5 Final.
--------------------------------------------------------------
java.lang.OutOfMemoryError: Direct buffer memory
[ERROR] [1/16/12 11:57 PM] [akka:event-driven:dispatcher:global-15]
[Switch] D
irect buffer memory
java.lang.OutOfMemoryError: Direct buffer memory
at java.nio.Bits.reserveMemory(Bits.java:633)
at java.nio.DirectByteBuffer.<init>(DirectByteBuffer.java:98)
at java.nio.ByteBuffer.allocateDirect(ByteBuffer.java:288)
at org.jboss.netty.channel.socket.nio.SocketSendBufferPool
$Preallocation
.<init>(SocketSendBufferPool.java:155)
at
org.jboss.netty.channel.socket.nio.SocketSendBufferPool.<init>(Socket
SendBufferPool.java:42)
at
org.jboss.netty.channel.socket.nio.NioWorker.<init>(NioWorker.java:84
)
at
org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.<init>
(NioClientSocketPipelineSink.java:74)
at
org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.<ini
t>(NioClientSocketChannelFactory.java:135)
at
org.jboss.netty.channel.socket.nio.NioClientSocketChannelFactory.<ini
t>(NioClientSocketChannelFactory.java:105)
at akka.remote.netty.ActiveRemoteClient$$anonfun$connect
$1.apply$mcV$sp(
NettyRemoteSupport.scala:431)
at akka.util.Switch.liftedTree1$1(LockUtil.scala:126)
at akka.util.Switch.transcend(LockUtil.scala:125)
at akka.util.Switch.switchOn(LockUtil.scala:138)
at
akka.remote.netty.ActiveRemoteClient.connect(NettyRemoteSupport.scala:
427)
at akka.remote.netty.NettyRemoteClientModule
$class.withClientFor(NettyRemoteSupport.scala:112)
at
akka.remote.netty.NettyRemoteSupport.withClientFor(NettyRemoteSupport.scala:
649)
at akka.remote.netty.NettyRemoteClientModule
$class.send(NettyRemoteSupport.scala:94)
at
akka.remote.netty.NettyRemoteSupport.send(NettyRemoteSupport.scala:
649)
at
akka.actor.LocalActorRef.postMessageToMailbox(ActorRef.scala:862)
at akka.actor.ScalaActorRef$class.$bang(ActorRef.scala:1398)
at akka.actor.LocalActorRef.$bang(ActorRef.scala:605)