From dev-return-91629-archive-asf-public=cust-asf.ponee.io@kafka.apache.org Fri Feb 9 12:54:04 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id B0731180654 for ; Fri, 9 Feb 2018 12:54:04 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A0C95160C5E; Fri, 9 Feb 2018 11:54:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E6E78160C2E for ; Fri, 9 Feb 2018 12:54:03 +0100 (CET) Received: (qmail 47850 invoked by uid 500); 9 Feb 2018 11:54:02 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 47838 invoked by uid 99); 9 Feb 2018 11:54:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Feb 2018 11:54:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 37316C0238 for ; Fri, 9 Feb 2018 11:54:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id jXo_8x5VNmUU for ; Fri, 9 Feb 2018 11:54:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id C3B135F27D for ; Fri, 9 Feb 2018 11:54:00 +0000 (UTC) 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 4EC90E0047 for ; Fri, 9 Feb 2018 11:54: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 0C5C021E85 for ; Fri, 9 Feb 2018 11:54:00 +0000 (UTC) Date: Fri, 9 Feb 2018 11:54:00 +0000 (UTC) From: "Gunnar Morling (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (KAFKA-6551) Unbounded queues in WorkerSourceTask cause OutOfMemoryError MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Gunnar Morling created KAFKA-6551: ------------------------------------- Summary: Unbounded queues in WorkerSourceTask cause OutOfMemoryError Key: KAFKA-6551 URL: https://issues.apache.org/jira/browse/KAFKA-6551 Project: Kafka Issue Type: Bug Components: KafkaConnect Reporter: Gunnar Morling A Debezium user reported an {{OutOfMemoryError}} to us, with over 50,000 messages in the {{WorkerSourceTask#outstandingMessages}} map. This map is unbounded and I can't see any way of "rate limiting" which would control how many records are added to it. Growth can only indirectly be limited by reducing the offset flush interval, but as connectors can return large amounts of messages in single {{poll()}} calls that's not sufficient in all cases. Note the user reported this issue during snapshotting a database, i.e. a high number of records arrived in a very short period of time. To solve the problem I'd suggest to make this map backpressure-aware and thus prevent its indefinite growth, so that no further records will be polled from the connector until messages have been taken out of the map again. -- This message was sent by Atlassian JIRA (v7.6.3#76005)