You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Laxman (JIRA)" <ji...@apache.org> on 2016/08/31 13:45:20 UTC

[jira] [Commented] (FLUME-2984) Default maxReadBufferBytes might cause OOM and cause thrift source exit

    [ https://issues.apache.org/jira/browse/FLUME-2984?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15452280#comment-15452280 ] 

Laxman commented on FLUME-2984:
-------------------------------

Can someone please add me to the project's contributors list. I'm not able to assign this issue myself.

> Default maxReadBufferBytes might cause OOM and cause thrift source exit
> -----------------------------------------------------------------------
>
>                 Key: FLUME-2984
>                 URL: https://issues.apache.org/jira/browse/FLUME-2984
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>    Affects Versions: v1.6.0
>            Reporter: Laxman
>
> Our usecase has multi agent flow and we are achieving this with thrift source and thrift sink combination. When there is a surge in incoming traffic downstream agent having thrift source is running out of memory. On further investigation of thrift transport/server code and scribe source found that we may need to fix the thrift transport's maxReadBufferBytes. Similar issue has been fixed in ScribeSource as part of FLUME-2404 by making this buffer configurable and capping it to a 16MB if not configured.
> *thrift code (org.apache.thrift.server.AbstractNonblockingServer)*
> {code}
>   public abstract static class AbstractNonblockingServerArgs<T extends AbstractNonblockingServer.AbstractNonblockingServerArgs<T>> extends AbstractServerArgs<T> {
>     public long maxReadBufferBytes = 9223372036854775807L;
>     public AbstractNonblockingServerArgs(TNonblockingServerTransport transport) {
>       super(transport);
>       this.transportFactory(new Factory());
>     }
>   }
> {code}
> *stacktrace*
> {noformat}
> 31 Aug 2016 12:52:24 ERROR [Thread-12] - run() exiting due to uncaught error
> java.lang.OutOfMemoryError: unable to create new native thread
>         at java.lang.Thread.start0(Native Method)
>         at java.lang.Thread.start(Thread.java:714)
>         at java.util.concurrent.ThreadPoolExecutor.addWorker(ThreadPoolExecutor.java:950)
>         at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1357)
>         at org.apache.thrift.server.TThreadedSelectorServer.requestInvoke(TThreadedSelectorServer.java:310)
>         at org.apache.thrift.server.AbstractNonblockingServer$AbstractSelectThread.handleRead(AbstractNonblockingServer.java:209)
>         at org.apache.thrift.server.TThreadedSelectorServer$SelectorThread.select(TThreadedSelectorServer.java:576)
>         at org.apache.thrift.server.TThreadedSelectorServer$SelectorThread.run(TThreadedSelectorServer.java:536)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)