Multiple Sentry consumers repeatedly become unhealthy due to Kafka coordinator/session timeouts
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- docker, docker-compose, kafka
调研方向
从附加的日志和标准 Docker Compose 配置开始,重点关注 Kafka coordinator 超时、consumer rebalance,以及 Sentry 和 Snuba consumer 中容器转为 unhealthy 的状态转换。比较受影响的 consumer 服务,并确定一种可复现的配置或恢复更改;当 consumer 保持健康状态并且无需手动重启即可持续处理消息时,即视为完成。
由索引模型根据 Issue 内容生成。
描述
Self-Hosted Version
26.8
CPU Architecture
x86_64
Docker Version
29.7.2
Docker Compose Version
v5.5.0
Machine Specification
- My system meets the minimum system requirements of Sentry
Installation Type
Upgrade from 26.7.2
Steps to Reproduce
-
Deploy a self-hosted Sentry installation using the standard Docker Compose configuration.
-
Start all Sentry services and verify that the consumers initially become healthy.
-
Leave the Sentry installation running under normal workload.
-
Allow the Sentry consumers to process events, performance metrics, buffered segments, monitor tasks, and other Kafka topics.
-
After some time, multiple consumers begin losing communication with the Kafka consumer group coordinator.
-
The issue can be observed in the logs with messages such as:
Consumer group session timed out (in join-state steady) after 45000 ms without a successful response from the group coordinator -
The consumers subsequently report errors such as:
KafkaError{code=NOT_COORDINATOR} KafkaError{code=_WAIT_COORD} KafkaError{code=COORDINATOR_LOAD_IN_PROGRESS} -
The affected containers eventually become
unhealthy. -
Restarting the Sentry stack temporarily restores the consumers to a healthy state.
-
The problem recurs several times per day, requiring approximately 4 Sentry restarts per day.
Affected containers include:
sentry-snuba-subscription-consumer-events-1
sentry-process-segments-1
sentry-post-process-forwarder-errors-1
sentry-monitors-clock-tasks-1
sentry-ingest-monitors-1
sentry-generic-metrics-consumer-1
sentry-events-consumer-1
The issue also affects Snuba's Kafka consumer for:
snuba-commit-log
Expected Result
Sentry consumers should remain connected to their Kafka consumer groups and continue processing messages normally during continuous operation.
The consumer containers should remain healthy and should not require manual restarts.
Temporary Kafka coordinator changes or consumer group rebalances should recover automatically without causing the containers to become unhealthy.
Actual Result
Multiple Sentry consumers periodically lose communication with the Kafka group coordinator and experience approximately 45-second consumer session timeouts.
The logs contain messages such as:
Consumer group session timed out (in join-state steady) after 45000 ms
without a successful response from the group coordinator
followed by:
Broker: Not coordinator
Local: Waiting for coordinator
and:
Broker: Coordinator load in progress
The consumers revoke their Kafka partitions and attempt to rejoin the consumer group.
For example:
Partitions to revoke:
[Partition(topic=Topic(name='events'), index=0)]
and:
Commit failed:
KafkaError{code=_WAIT_COORD,val=-180,str="Local: Waiting for coordinator"}
Snuba exhibits the same behavior on snuba-commit-log, suggesting that the problem is not isolated to a single Sentry consumer.
Additionally, sentry-process-segments-1 frequently reports processing delays such as:
Batch process is taking longer than 5 seconds.
and:
Waited on the process pool longer than 20 seconds.
Waiting for 1 results.
After these Kafka coordinator/session problems, multiple containers become unhealthy.
Restarting the Sentry stack temporarily resolves the problem, but the same behavior returns several times per day, requiring approximately 4 manual restarts per day.
_sentry-process-segments-1_logs.txt
_sentry-post-process-forwarder-errors-1_logs.txt
_sentry-monitors-clock-tasks-1_logs.txt
_sentry-ingest-monitors-1_logs.txt
_sentry-generic-metrics-consumer-1_logs.txt
_sentry-events-consumer-1_logs.txt
_sentry-snuba-subscription-consumer-events-1_logs.txt
Event ID
No response
- 主要语言
- Shell
- 星标
- 9.7k
- 派生
- 2k
- 平均合并
- 3 天 2 小时
- 30 天内合并 PR
- 16
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
getsentry/self-hosted 的其他 Issue
-
Waiting for: Product Owner
难度 2/5 1-3 小时 新手友好度 72/100
getsentry/self-hosted#4644 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
getsentry/self-hosted#4518 · 3 条评论 · 1 个 reaction ·
维护者通常 2 天内回复
-
Waiting for: Product Owner
难度 3/5 1-2 天 新手友好度 73/100
getsentry/self-hosted#4642 · 3 条评论 · 1 个 reaction ·
维护者通常 2 天内回复
-
Waiting for: Community
难度 4/5 3-5 天 新手友好度 28/100
getsentry/self-hosted#4637 · 1 条评论 ·
维护者通常 2 天内回复
-
Waiting for: Product Owner
难度 4/5 3-5 天 新手友好度 25/100
getsentry/self-hosted#4634 ·
维护者通常 2 天内回复
查看 getsentry/self-hosted 的全部 Issue
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 74/100
ajithakdev/claude-desktop-rpm#43 ·
维护者通常 1 天内回复
-
documentation enhancement
难度 2/5 1-3 小时 新手友好度 82/100
aws/aws-networking-best-practices#256 ·
维护者通常 2 天内回复
-
area:terraform source:reader type:content-error
难度 1/5 1 小时以内 新手友好度 88/100
stephrobert/blog-roadmap#268 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
fossi-foundation/globalfoundries-pdk-libs-gf180mcu_fd_pv#61 ·
-
openai-directory
难度 2/5 1-3 小时 新手友好度 70/100