Flume MemoryChannel ChannelFullException

先贴上异常信息

 1 08 May 2015 17:55:23,751 WARN  [New I/O  worker #1] (org.apache.flume.source.AvroSource.append:350)  - Avro source r1: Unable to process event. Exception follows.
 2 org.apache.flume.ChannelException: Unable to put event on required channel: org.apache.flume.channel.MemoryChannel{name: c2}
 3     at org.apache.flume.channel.ChannelProcessor.processEvent(ChannelProcessor.java:275)
 4     at org.apache.flume.source.AvroSource.append(AvroSource.java:348)
 5     at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
 6     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 7     at java.lang.reflect.Method.invoke(Method.java:606)
 8     at org.apache.avro.ipc.specific.SpecificResponder.respond(SpecificResponder.java:88)
 9     at org.apache.avro.ipc.Responder.respond(Responder.java:149)
10     at org.apache.avro.ipc.NettyServer$NettyServerAvroHandler.messageReceived(NettyServer.java:188)
11     at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
12     at org.apache.avro.ipc.NettyServer$NettyServerAvroHandler.handleUpstream(NettyServer.java:173)
13     at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:558)
14     at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:786)
15     at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296)
16     at org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:458)
17     at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:439)
18     at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:311)
19     at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
20     at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:558)
21     at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:553)
22     at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
23     at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
24     at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:84)
25     at org.jboss.netty.channel.socket.nio.AbstractNioWorker.processSelectedKeys(AbstractNioWorker.java:471)
26     at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:332)
27     at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:35)
28     at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:102)
29     at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
30     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
31     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
32     at java.lang.Thread.run(Thread.java:745)
33 Caused by: org.apache.flume.ChannelFullException: Space for commit to queue couldn't be acquired. Sinks are likely not keeping up with sources, or the buffer size is too tight
34     at org.apache.flume.channel.MemoryChannel$MemoryTransaction.doCommit(MemoryChannel.java:130)
35     at org.apache.flume.channel.BasicTransactionSemantics.commit(BasicTransactionSemantics.java:151)
36     at org.apache.flume.channel.ChannelProcessor.processEvent(ChannelProcessor.java:267)
37     ... 29 more

问题分析

从标红部分大致可以看出,MemoryChannel满了,source写不进去。

从程序运行表现来看,可能导致flume堵死,不能传输日志了(我遇到的现象)

解决办法

参考 http://blog.csdn.net/hijk139/article/details/8465094

增大MemoryChannel的容量,增加处理时间

修改配置文件

# channel c2 的配置
a1.channels.c2.type = memory
a1.channels.c2.capacity = 1000000
a1.channels.c2.transactionCapacity = 80000
a1.channels.c2.keep-alive = 30

 

posted on 2015-05-15 15:59  Erbin  阅读(1351)  评论(0编辑  收藏  举报

导航