From dev-return-80024-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Tue Apr 9 16:21:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id CE91F180629 for ; Tue, 9 Apr 2019 18:21:01 +0200 (CEST) Received: (qmail 6412 invoked by uid 500); 9 Apr 2019 16:01:23 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 6401 invoked by uid 99); 9 Apr 2019 16:01:23 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Apr 2019 16:01:23 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 60A64E0F8F for ; Tue, 9 Apr 2019 16:21:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 0575D24593 for ; Tue, 9 Apr 2019 16:21:00 +0000 (UTC) Date: Tue, 9 Apr 2019 16:21:00 +0000 (UTC) From: "Fangmin Lv (JIRA)" To: dev@zookeeper.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (ZOOKEEPER-3356) Request throttling in Netty is not working as expected and could cause direct buffer OOM issue MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Fangmin Lv created ZOOKEEPER-3356: ------------------------------------- Summary: Request throttling in Netty is not working as expecte= d and could cause direct buffer OOM issue=20 Key: ZOOKEEPER-3356 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3356 Project: ZooKeeper Issue Type: Bug Components: server Affects Versions: 3.5.4, 3.6.0 Reporter: Fangmin Lv Assignee: Fangmin Lv Fix For: 3.6.0 The current implementation of Netty enable/disable recv logic may cause the= direct buffer OOM because we may enable read a large chunk of packets and = disabled again after consuming a single ZK request. We have seen this probl= em on prod occasionally. =C2=A0 Need a more advanced flow control in Netty instead of using AUTO_READ. Have= =C2=A0improved=C2=A0it internally=C2=A0by enable/disable recv based on the = queuedBuffer size, will upstream this soon. =C2=A0 With this implementation, the max Netty queued buffer size (direct memory u= sage) will be 2 * recv_buffer size. It's not the per message size because i= n epoll ET mode it will try to read until the socket is empty, and because = of SslHandler will trigger another read when it's not a full encrypt packet= and haven't issued any decrypt message. -- This message was sent by Atlassian JIRA (v7.6.3#76005)