kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ismael Juma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-2614) No more clients can connect after `TooManyConnectionsException` threshold (max.connections.per.ip) is reached
Date Wed, 07 Oct 2015 12:47:27 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-2614?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14946786#comment-14946786

Ismael Juma commented on KAFKA-2614:

Thanks for filing this, there is indeed an issue where we are not handling disconnections
properly. I have fixed it locally and will push a PR soon for discussion.

> No more clients can connect after `TooManyConnectionsException` threshold (max.connections.per.ip)
is reached
> -------------------------------------------------------------------------------------------------------------
>                 Key: KAFKA-2614
>                 URL: https://issues.apache.org/jira/browse/KAFKA-2614
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>    Affects Versions:
>         Environment: Debian Jessie
>            Reporter: Stephen Chu
>            Assignee: Ismael Juma
>            Priority: Critical
>             Fix For:
> It seems no more clients can connect to Kafka after `max.connections.per.ip` is reached,
even if previous clients were already disconnected.
> Using 0.8.3 (9c936b18), upon starting a fresh Kafka server that is configured with (max.connections.per.ip
= 24), I noticed that I can cause the server to hit the error case of {{INFO Rejected connection
from /0:0:0:0:0:0:0:1, address already has the configured maximum of 24 connections.}} very
quickly, by simply looping through a bunch of simple clients against the server:
> {noformat}
> #! /bin/bash
> for i in {1..30}; do
>     # either:
>     nc -vz 9092;
>     # or:
>     ( telnet 9092; ) &
> done
> # if using telnet, kill all connected jobs now via:
> kill %{2..31}
> {noformat}
> The problem seems to be that the counter for such short-lived client connections aren't
properly decrementing when using the `max.connections.per.ip` feature.
> Turning on DEBUG logs, I cannot see the log lines "Closing connection from xxx" on [this
from the first few still-under-threshold short-lived connections, but starts showing *after*
I hit the limit per that config.

This message was sent by Atlassian JIRA

View raw message