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 #10046

Merged
merged 4 commits into from
Jan 4, 2023

Conversation

hanshuebner
Copy link
Contributor

@hanshuebner hanshuebner commented Jan 3, 2023

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.

KAG-303

Checklist

@hanshuebner hanshuebner marked this pull request as ready for review January 3, 2023 16:45
@hanshuebner hanshuebner changed the title fix(*): prevent queues to grow without bounds fix(*): prevent queues from growing without bounds Jan 3, 2023
kong/tools/batch_queue.lua Show resolved Hide resolved
kong/tools/batch_queue.lua Show resolved Hide resolved
kong/tools/batch_queue.lua Outdated Show resolved Hide resolved
spec/01-unit/27-batch_queue_spec.lua Show resolved Hide resolved
Hans Hübner added 4 commits January 4, 2023 15:41
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.

KAG-303
@hanshuebner hanshuebner merged commit 2f45e7a into master Jan 4, 2023
@hanshuebner hanshuebner deleted the kag-303-batch-queue-limit branch January 4, 2023 15:18
kikito pushed a commit that referenced this pull request Feb 8, 2023
* fix(*): prevent queues from growing without bounds (#10046)

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

KAG-303

This reverts commit 218cc0a.

* fix(*): need to actually wait for queue to be processed

2.8 uses the ngx native timers that behave slightly differently when
sleep(0) is invoked
kikito pushed a commit that referenced this pull request Feb 8, 2023
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 pushed a commit that referenced this pull request Feb 8, 2023
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

KAG-303

This reverts commit 218cc0a.
kikito pushed a commit that referenced this pull request Feb 8, 2023
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

KAG-303

This reverts commit 218cc0a.
This was referenced Mar 16, 2023
dndx pushed a commit that referenced this pull request Sep 19, 2023
dndx pushed a commit that referenced this pull request Sep 19, 2023
dndx pushed a commit that referenced this pull request Sep 19, 2023
AndyZhang0707 added a commit that referenced this pull request Dec 4, 2023
windmgc pushed a commit that referenced this pull request Dec 11, 2023
windmgc pushed a commit that referenced this pull request Dec 11, 2023
windmgc pushed a commit that referenced this pull request Dec 11, 2023
AndyZhang0707 added a commit that referenced this pull request Jul 18, 2024
AndyZhang0707 added a commit that referenced this pull request Jul 18, 2024
AndyZhang0707 added a commit that referenced this pull request Jul 18, 2024
AndyZhang0707 added a commit that referenced this pull request Jul 26, 2024
AndyZhang0707 added a commit that referenced this pull request Jul 26, 2024
AndyZhang0707 added a commit that referenced this pull request Jul 26, 2024
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.

4 participants