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

Policy evaluation can take too long and cause the consumer thread to be kicked out of the consumer group #529

Closed
nscuro opened this issue Apr 28, 2023 · 3 comments
Assignees
Labels
component/api-server defect Something isn't working p2 Non-critical bugs, and features that help organizations to identify and reduce risk performance

Comments

@nscuro
Copy link
Member

nscuro commented Apr 28, 2023

We're seeing Kafka Streams consumer threads occasionally getting kicked out of the consumer group due to policy evaluation taking too long:

consumer poll timeout has expired. This means the time between subsequent calls to poll() was longer than the configured max.poll.interval.ms, which typically implies that the poll loop is spending too much time processing messages. You can address this either by increasing max.poll.interval.ms or by reducing the maximum size of batches returned in poll with max.poll.records.

Followed by:

Detected that the thread is being fenced. This implies that this thread missed a rebalance and dropped out of the consumer group. Will close out all assigned tasks and rejoin the consumer group.

Prior to this happening, we can see the average thread process latency skyrocketing to 15-30s, which is entirely too much. It should be <= 10ms.

@nscuro nscuro added defect Something isn't working p1 Critical bugs that prevent DT from being used, or features that must be implemented ASAP component/api-server labels Apr 28, 2023
@mehab
Copy link
Collaborator

mehab commented May 2, 2023

Might be able to address this with #405

@nscuro
Copy link
Member Author

nscuro commented May 3, 2023

nscuro added a commit to DependencyTrack/hyades-apiserver that referenced this issue May 10, 2023
This is a temporary solution until we have policy evaluation in a state where it cannot block the Kafka consumer thread for too long anymore.

Relates to DependencyTrack/hyades#529

Signed-off-by: nscuro <nscuro@protonmail.com>
nscuro added a commit to DependencyTrack/hyades-apiserver that referenced this issue May 10, 2023
This is a temporary solution until we have policy evaluation in a state where it cannot block the Kafka consumer thread for too long anymore.

Relates to DependencyTrack/hyades#529

Signed-off-by: nscuro <nscuro@protonmail.com>
nscuro added a commit to DependencyTrack/hyades-apiserver that referenced this issue May 10, 2023
This is a temporary solution until we have policy evaluation in a state where it cannot block the Kafka consumer thread for too long anymore.

Relates to DependencyTrack/hyades#529

Signed-off-by: nscuro <nscuro@protonmail.com>
nscuro added a commit to DependencyTrack/hyades-apiserver that referenced this issue May 11, 2023
This is a temporary solution until we have policy evaluation in a state where it cannot block the Kafka consumer thread for too long anymore.

Relates to DependencyTrack/hyades#529

Signed-off-by: nscuro <nscuro@protonmail.com>
@nscuro nscuro added p2 Non-critical bugs, and features that help organizations to identify and reduce risk and removed p1 Critical bugs that prevent DT from being used, or features that must be implemented ASAP labels Jun 24, 2023
@mehab
Copy link
Collaborator

mehab commented Jul 7, 2023

@nscuro will be creating a separate issue for policy evaluation since it is still a time consuming task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/api-server defect Something isn't working p2 Non-critical bugs, and features that help organizations to identify and reduce risk performance
Projects
None yet
Development

No branches or pull requests

2 participants