es gc 出错
2017-03-28 本文已影响93人
阳春是你
在向es提交索引时候,报出如下错误
三月 26, 2017 2:04:32 下午 org.elasticsearch.transport.netty.NettyTransport exceptionCaught
警告: [Supercharger] exception caught on transport layer [[id: 0x00505888, /10.8.0.10:44910 => /10.8.0.10:9300]], closing connection
java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.nio.DirectByteBuffer.duplicate(DirectByteBuffer.java:217)
at org.jboss.netty.channel.socket.nio.SocketSendBufferPool.acquire(SocketSendBufferPool.java:87)
at org.jboss.netty.channel.socket.nio.SocketSendBufferPool.acquire(SocketSendBufferPool.java:46)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.write0(AbstractNioWorker.java:193)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.writeFromTaskLoop(AbstractNioWorker.java:151)
at org.jboss.netty.channel.socket.nio.AbstractNioChannel$WriteTask.run(AbstractNioChannel.java:315)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:391)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:315)
at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
意思是gc开销超越了极限。在程序中,因为机器内存较大,所以我将大量数据加载到了内存中,对加载如内存的数据进行了控制。