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

fix(*): prevent queues from growing without bounds #10247

Merged
merged 2 commits into from
Feb 7, 2023

Conversation

hanshuebner
Copy link
Contributor

Summary

This commit implements an upper limit on the number of batches that may be waiting on a queue for processing. Once the limit has been reached, the oldest batch is dropped from the queue and an error message is logged. The maximum number of batches that can be waiting on a queue is configured through the max_queued_batches parameter of the queue, which defaults to 100 and can be globally overriden with the max_queued_batches parameter in kong.conf

A more complete rewrite of the queuing system is in the works but will not make it into 3.2.

KAG-303

This reverts commit 218cc0a and fffb4e8

Checklist

CHANGELOG.md Outdated Show resolved Hide resolved
kong.conf.default Outdated Show resolved Hide resolved
This commit implements an upper limit on the number of batches that
may be waiting on a queue for processing.  Once the limit has been
reached, the oldest batch is dropped from the queue and an error
message is logged.  The maximum number of batches that can be waiting
on a queue is configured through the max_queued_batches parameter of
the queue, which defaults to 100 and can be globally overriden with
the max_queued_batches parameter in kong.conf

A more complete rewrite of the queuing system is in the works but will
not make it into 3.2.

KAG-303

This reverts commit 218cc0a.
@kikito kikito changed the title fix(*): prevent queues from growing without bounds (#10046) fix(*): prevent queues from growing without bounds Feb 7, 2023
@kikito kikito merged commit 94a31c6 into master Feb 7, 2023
@kikito kikito deleted the kag-303-queue-band-aid branch February 7, 2023 17:57
@mashapedeployment
Copy link
Contributor

The backport to release/2.8.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/2.8.x release/2.8.x
# Navigate to the new working tree
cd .worktrees/backport-release/2.8.x
# Create a new branch
git switch --create backport-10247-to-release/2.8.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 94a31c6471f5a52e22968e88f522135213233324
# Push it to GitHub
git push --set-upstream origin backport-10247-to-release/2.8.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/2.8.x

Then, create a pull request where the base branch is release/2.8.x and the compare/head branch is backport-10247-to-release/2.8.x.

@mashapedeployment
Copy link
Contributor

The backport to release/3.0.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/3.0.x release/3.0.x
# Navigate to the new working tree
cd .worktrees/backport-release/3.0.x
# Create a new branch
git switch --create backport-10247-to-release/3.0.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 94a31c6471f5a52e22968e88f522135213233324
# Push it to GitHub
git push --set-upstream origin backport-10247-to-release/3.0.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/3.0.x

Then, create a pull request where the base branch is release/3.0.x and the compare/head branch is backport-10247-to-release/3.0.x.

@mashapedeployment
Copy link
Contributor

The backport to release/3.1.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/3.1.x release/3.1.x
# Navigate to the new working tree
cd .worktrees/backport-release/3.1.x
# Create a new branch
git switch --create backport-10247-to-release/3.1.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 94a31c6471f5a52e22968e88f522135213233324
# Push it to GitHub
git push --set-upstream origin backport-10247-to-release/3.1.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/3.1.x

Then, create a pull request where the base branch is release/3.1.x and the compare/head branch is backport-10247-to-release/3.1.x.

@dndx
Copy link
Member

dndx commented Feb 9, 2023

@hanshuebner I might be missing some context but what is driving the inclusion of this feature again? What's the implication of this change for batch queue rewrite later? Can we remove this new config option safely in the future?

@hanshuebner
Copy link
Contributor Author

@dndx We've decided to include this band-aid fix because an important customer demands an immediate solution (FTI-4756). We will be able to deprecate the global parameter and convert it to the plugin specific parameter - if set - when we move on to the new implementation.

curiositycasualty pushed a commit that referenced this pull request Oct 15, 2024
KAG-5244

Move echo server related functions since they are using cmd.stop_kong()

Cherry-picked from #13648
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.

6 participants