Skip to content

KAFKA-2614; No more clients can connect after TooManyConnectionsException threshold (max.connections.per.ip) is reached#288

Closed
ijuma wants to merge 3 commits intoapache:trunkfrom
ijuma:kafka-2614-connection-count-not-updated
Closed

KAFKA-2614; No more clients can connect after TooManyConnectionsException threshold (max.connections.per.ip) is reached#288
ijuma wants to merge 3 commits intoapache:trunkfrom
ijuma:kafka-2614-connection-count-not-updated

Conversation

@ijuma
Copy link
Copy Markdown
Member

@ijuma ijuma commented Oct 8, 2015

  • Call ConnectionQuotas.decr when calling Selector.close and when disconnections happen.
  • Expand SocketServerTest to test for this and to close sockets.
  • Refactor and clean-up SocketServer and Acceptor to make the code easier to understand.

…isconnections happen

Also:
* Expand `SocketServerTest` to test for this and to close sockets.
* Refactor and clean-up `SocketServer` and `Acceptor` to make the code easier to understand.
@ijuma
Copy link
Copy Markdown
Member Author

ijuma commented Oct 8, 2015

Tests passed locally.

@ijuma
Copy link
Copy Markdown
Member Author

ijuma commented Oct 8, 2015

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work for ipv6? We probably should use the parser in BrokerEndPoint.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, fixed as you suggested.

ijuma added 2 commits October 9, 2015 08:03
…n-count-not-updated

* apache/trunk:
  KAFKA-2596: reject commits from unknown groups with positive generations
  MINOR: typing ProcessorDef
…ion string

The previous code did not handle IPv6 properly as pointed out by Jun.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see socket can never be null here.

@ijuma
Copy link
Copy Markdown
Member Author

ijuma commented Oct 9, 2015

@junrao Fixed the issue you mentioned, tests passing locally. I also moved some comments I had mistakenly left on the commit into the "Files changed" tab to make the review easier.

@junrao
Copy link
Copy Markdown
Contributor

junrao commented Oct 10, 2015

Thanks for the patch. LGTM

@asfgit asfgit closed this in 1265d7c Oct 10, 2015
@ijuma ijuma deleted the kafka-2614-connection-count-not-updated branch March 1, 2016 22:47
wyuka pushed a commit to wyuka/kafka that referenced this pull request Mar 4, 2022
…= KAFKA_2_3_IV2 (apache#288)

TICKET = KAFKA-7186
LI_DESCERIPTION =
The original PR for this change is apache#75.
Before this patch, the controller needs to allocate an individual UpdateMetadataRequest.Builder
for each broker. This may incur significant memory overhead if the controller has just started,
and is trying to send the cluster's full metadata to all brokers.

This PR tries to reduce the memory footprint by reusing the same UpdateMetadataRequest.Builder.
This is only achievable when all of the UMR have the same body payload, which means
the common UMR should use the maxBrokerEpoch field instead of individual broker epochs.

EXIT_CRITERIA = KAFKA-7186
wyuka pushed a commit to wyuka/kafka that referenced this pull request Mar 28, 2022
…= KAFKA_2_3_IV2 (apache#288)

TICKET = KAFKA-7186
LI_DESCERIPTION =
The original PR for this change is apache#75.
Before this patch, the controller needs to allocate an individual UpdateMetadataRequest.Builder
for each broker. This may incur significant memory overhead if the controller has just started,
and is trying to send the cluster's full metadata to all brokers.

This PR tries to reduce the memory footprint by reusing the same UpdateMetadataRequest.Builder.
This is only achievable when all of the UMR have the same body payload, which means
the common UMR should use the maxBrokerEpoch field instead of individual broker epochs.

EXIT_CRITERIA = KAFKA-7186
wyuka pushed a commit to wyuka/kafka that referenced this pull request Jun 16, 2022
…= KAFKA_2_3_IV2 (apache#288)

TICKET = KAFKA-7186
LI_DESCERIPTION =
The original PR for this change is apache#75.
Before this patch, the controller needs to allocate an individual UpdateMetadataRequest.Builder
for each broker. This may incur significant memory overhead if the controller has just started,
and is trying to send the cluster's full metadata to all brokers.

This PR tries to reduce the memory footprint by reusing the same UpdateMetadataRequest.Builder.
This is only achievable when all of the UMR have the same body payload, which means
the common UMR should use the maxBrokerEpoch field instead of individual broker epochs.

EXIT_CRITERIA = KAFKA-7186
davide-armand pushed a commit to aiven/kafka that referenced this pull request Dec 1, 2025
jeqo added a commit to aiven/kafka that referenced this pull request Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants