Skip to content

See #7593. Use connection_max to stop connections in rabbitmq #7753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

SimonUnge
Copy link
Collaborator

@SimonUnge SimonUnge commented Mar 29, 2023

Proposed Changes

Closes #7593

Use connection_max to limit connections per node, from rabbitmq code, instead of ranch.

Add ranch_connection_max setting for setting ranch connection max.

Types of Changes

What types of changes does your code introduce to this project?
Put an x in the boxes that apply

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)
  • Build system and/or CI

Checklist

Put an x in the boxes that apply.
You can also fill these out after creating the PR.
If you're unsure about any of them, don't hesitate to ask on the mailing list.
We're here to help!
This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally with my changes
  • If relevant, I have added necessary documentation to https://github.com/rabbitmq/rabbitmq-website
  • If relevant, I have added this change to the first version(s) in release-notes that I expect to introduce it

Further Comments

N/A

Copy link
Contributor

@lhoguin lhoguin left a comment

Choose a reason for hiding this comment

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

Nevermind the previous comment I understand now. Looks good to me, thanks!

@michaelklishin michaelklishin merged commit 8baaa86 into rabbitmq:main Mar 29, 2023
michaelklishin added a commit that referenced this pull request Mar 29, 2023
See #7593. Use connection_max to stop connections in rabbitmq (backport #7753)
michaelklishin added a commit that referenced this pull request Mar 29, 2023
See #7593. Use connection_max to stop connections in rabbitmq (backport #7753) (backport #7755)
@michaelklishin
Copy link
Collaborator

We don't have a lot of details but in #7787 this new function runs into an exception when a client connects.

@michaelklishin
Copy link
Collaborator

Here are various config files

@michaelklishin
Copy link
Collaborator

RABBITMQ_NODENAME=rabbit@primary
RABBITMQ_LOG_BASE=/var/log/kolla/rabbitmq
RABBITMQ_DIST_PORT=25672
RABBITMQ_PID_FILE=/var/lib/rabbitmq/mnesia/rabbitmq.pid
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS="-kernel inetrc '/etc/rabbitmq/erl_inetrc' +S 2:2 +sbwt none +sbwtdcpu none +sbwtdio none"
RABBITMQ_CTL_ERL_ARGS=""

export ERL_EPMD_ADDRESS=192.0.2.1
export ERL_EPMD_PORT=4369
export ERL_INETRC=/etc/rabbitmq/erl_inetrc
[
  {kernel, [
    {inet_dist_use_interface, {192,0,2,1}},
    {inet_dist_listen_min, 25672},
    {inet_dist_listen_max, 25672}
  ]}
].

michaelklishin added a commit that referenced this pull request Mar 31, 2023
In rabbit_reader:is_over_connection_limit/2.

References #7753, #7787, #7593.
@michaelklishin
Copy link
Collaborator

A follow-up that will go into 3.11.13 #7788

michaelklishin added a commit that referenced this pull request Mar 31, 2023
In rabbit_reader:is_over_connection_limit/2.

References #7753, #7787, #7593.
mergify bot pushed a commit that referenced this pull request Mar 31, 2023
In rabbit_reader:is_over_connection_limit/2.

References #7753, #7787, #7593.

(cherry picked from commit e56e26c)
mergify bot pushed a commit that referenced this pull request Mar 31, 2023
In rabbit_reader:is_over_connection_limit/2.

References #7753, #7787, #7593.

(cherry picked from commit e56e26c)
michaelklishin added a commit that referenced this pull request Mar 31, 2023
In rabbit_reader:is_over_connection_limit/2.

References #7753, #7787, #7593.

(cherry picked from commit e56e26c)
michaelklishin added a commit that referenced this pull request Mar 31, 2023
In rabbit_reader:is_over_connection_limit/2.

References #7753, #7787, #7593.

(cherry picked from commit e56e26c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

More predictable and firm connection_max for limiting number of connections per RabbitMQ node
3 participants