首页 > 解决方案 > flink taskmanager 因 OOM 失败

问题描述

有一个听 kafka 主题的 flink 工作,所有的工作就是听 kafka 并将消息插入到弹性搜索中。由于其中一位任务管理器进入 OOM,这项工作一直失败。

我在 3gb 内存的 kubernetes 中使用 flink docker。但我在任务管理器日志中看到失败。我没有使用任何特殊功能,只是听和写弹性。

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "I/O dispatcher 2945"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "pool-1170-thread-1"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "I/O dispatcher 5441"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "I/O dispatcher 2467"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "pool-3944-thread-1"

Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "pool-2651-thread-1"

标签: javaapache-flinkflink-streaming

解决方案


@Thanks Arvid,我们确实挖掘了日志,发现 ES 在修复它并使用rocksDB作为后端状态后泄漏了一个连接代码问题,我们在增量检查点打开的情况下运行平稳。


推荐阅读