Skip to content
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

Drop messages when connection send buffer limit has been reached #126

Merged
merged 3 commits into from
Jan 3, 2023

Conversation

achim-k
Copy link
Collaborator

@achim-k achim-k commented Dec 23, 2022

Public-Facing Changes

  • Drop messages when connection send buffer limit has been reached

Description
We currently do have the problem that slow clients/connections can cause the server's connection send buffer to grow indefinitely potentially leading to the server being killed as it consumes too much memory. This PR introduces a user configurable send buffer limit. If the limit has been reached, messages that are to be send over this connection will be dropped in order to prevent the send buffer growing indefinitely.

See also #116

if (bufferSizeinBytes >= _send_buffer_limit_bytes) {
_server.get_elog().write(WARNING,
"Send buffer for client '" + remoteEndpointString(clientHandle) +
"' is full, dropping message on channel " + std::to_string(chanId));
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this

@achim-k achim-k enabled auto-merge (squash) January 3, 2023 22:05
@achim-k achim-k merged commit e417709 into main Jan 3, 2023
@achim-k achim-k deleted the achim/add_send_buffer_limit branch January 3, 2023 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants