Skip to content

fix(docker): 健康检查加固 + kafka/zk 僵尸进程根治 + 移除死依赖 - #53

Merged
xianshi3 merged 3 commits into
masterfrom
fix/healthcheck-hardening
Aug 24, 2026
Merged

xianshi3 merged 3 commits into
masterfrom
fix/healthcheck-hardening

Conversation

@xianshi3

Copy link
Copy Markdown
Collaborator

3 个提交:

  • fix(docker): 健康检查加固, 高负载下防误判重启循环
    2核负载 38+ 时 3s 超时 healthcheck 频繁失败导致 unhealthy 重启循环
    → interval 60s / timeout 10s / start-period 90s (6 个 Java 容器)
  • fix(compose): kafka/zookeeper 僵尸进程根治
    服务器实测 mes-kafka 1072 + mes-zookeeper 137 个僵尸 (Confluent entrypoint 非 exec)
    → init: true 注入 dockerd 内置 tini, 无需升级镜像/额外下载
  • chore(build): 移除未使用的 elasticsearch-java 死依赖

服务器 2 核负载 38+ 时, 3s 超时的 curl 健康检查频繁失败导致
容器被误判 unhealthy 并重启。调整为:
- interval 30s → 60s (降低检查频率)
- timeout 3s → 10s (高负载下容忍慢响应)
- 新增 start-period 90s (Spring Boot 启动期内不判定)
服务器实测 mes-kafka 1072 个 / mes-zookeeper 137 个僵尸进程:
Confluent entrypoint 非 exec 形式, 健康检查脚本频繁 fork 子进程
且无人回收。为两容器加 init: true (dockerd 内置 tini 作 PID 1,
无需下载镜像)。镜像版本保持 7.5.0 不变, 升级可选。
依赖管理中的 co.elastic.clients:elasticsearch-java 无任何模块引用、
源码无 import、compose 无 ES 容器, 纯属冗余。
@xianshi3
xianshi3 merged commit 4536934 into master Aug 24, 2026
4 checks passed
@xianshi3
xianshi3 deleted the fix/healthcheck-hardening branch August 24, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant