最近完成一个业务需求,flink程序上线之后,跑了不到一分钟就挂了,查看日志,报错如下:

org.apache.flink.util.FlinkRuntimeException: Exceeded checkpoint tolerable failure threshold.at org.apache.flink.runtime....


明显,checkpoint超时了,于是,我下意识地去检查checkpoint的设置,
代码中的设置如下:

        // 每 ** ms 开始一次 checkpointenv.enableCheckpointing(10*1000);// 设置模式为精确一次 (这是默认值)env.getCheckpointConfig().setCheckpointingMode(CheckpointingMode.AT_LEAST_ONCE);// 确认 checkpoints 之间的时间会进行 ** msenv.getCheckpointConfig().setMinPauseBetweenCheckpoints(500);// Checkpoint 必须在一分钟内完成,否则就会被抛弃env.getCheckpointConfig().setCheckpointTimeout(60000);// 同一时间只允许一个 checkpoint 进行env.getCheckpointConfig().setMaxConcurrentCheckpoints(1);// 开启在 job 中止后仍然保留的 externalized checkpointsenv.getCheckpointConfig().enableExternalizedCheckpoints(CheckpointConfig.ExternalizedCheckpointCleanup.RETAIN_ON_CANCELLATION);// 允许在有更近 savepoint 时回退到 checkpointenv.getCheckpointConfig().setPreferCheckpointForRecovery(true);

尝试更改一下timeout时间,从1分钟改为10分钟,重新打包上线。
然后查看UI界面,发现checkpoint仍然无法正常进行,状态一直是IN_PROGRESS,没有进展,只不过从等待1分钟变成了10分钟,程序最后还是挂掉

这个时候,考虑不是checkpoint设置问题,而是程序有bug,资源没有释放或者其他问题,导致程序卡住了,以至于checkpoint超时。

仔细检查etl逻辑,发现忘了关闭数据库连接。

        //关闭连接和释放资源if (connection != null) {connection.close();}if (ps != null) {ps.close();}

在本地测试的时候,由于测试数据的并发量不够,数据库没有被打满,所有没有出现任务卡住了;上了预生产环境后的大量数据涌入,才导致问题出现,本地调试发现不了这个问题。
修改代码重新上线,查看checkpoint界面,正常执行。

Exceeded checkpoint tolerable failure threshould【记一次flink上线异常】相关推荐

  1. flink程序:Exceeded checkpoint tolerable failure threshould

    @[TOC]Exceeded checkpoint tolerable failure threshould 在写一个flink程序时报错, Exceeded checkpoint tolerable ...

  2. Flink报错:exceeded checkpoint tolerable failure threshould

    问题如图: 原因: 资源太小 checkpoint时间太小 数据库连接未关闭,资源未释放. 解决: 重新部署运行,正常!

  3. 【Flink】Flink检查点时间太小导致Exceeded checkpoint tolerable failure threshould

    文章目录 1.背景 2.场景2 1.背景 写了一个flink程序,大概如下 @Testpublic void flatMapStateBackendTest() throws Exception {S ...

  4. org.apache.flink.util.FlinkRuntimeException: Exceeded checkpoint tolerable failure threshold

    org.apache.flink.util.FlinkRuntimeException: Exceeded checkpoint tolerable failure threshold. 原因 Che ...

  5. flink 出现反压场景, 异常场景造成Exceeded checkpoint tolerable failure threshold.

    flink 出现反压场景,异常场景造成Exceeded checkpoint tolerable failure threshold. 监控反压情况 根据算子的InPool, OutPool 的比例, ...

  6. Flink任务失败,检查点失效:Exceeded checkpoint tolerable failure threshold.

    项目场景: 最近实时平台flink任务频繁失败,报检查点方面的错误,最近集群的hdfs也经常报警:运行状况不良,不知道是否和该情况有关,我的状态后端位置是hdfs,废话不多说,干货搞起来~ 问题描述 ...

  7. Flink报错:org.apache.flink.util.FlinkRuntimeException: Exceeded checkpoint tolerable failure threshold

    org.apache.flink.util.FlinkRuntimeException: Exceeded checkpoint tolerable failure threshold 一.问题描述 ...

  8. [Flink 日记]Exceeded checkpoint tolerable failure threshold.

    org.apache.flink.util.FlinkRuntimeException: Exceeded checkpoint tolerable failure threshold. 原因 Che ...

  9. 【Flink】Flink Exceeded checkpoint tolerable failure threshold

    文章目录 1.概述 2.源码 2.1 源码解析 2.2 小结 3.场景2 1.概述 Flink程序,如果单平行度运行是正常的,多并行度运行时有一个subtask的数据量很少,写kafka的数据为0,在 ...

最新文章

  1. 【Android开发教程】一、基础概念
  2. Android Fragment add/replace以及backstack
  3. 用文本指导文本:基于文本的自监督可控文本生成模型
  4. 十大排序算法之堆排序
  5. Ansible系列之roles使用说明
  6. 事故现场之依赖了不该依赖的 host ip
  7. freebsd 安装教程
  8. c++ map底层_Redis详解(四)------ redis的底层数据结构
  9. 如何在Android上使背景20%透明
  10. qq群管+引流+娱乐机器人
  11. 进销存软件定制开发怎么做?
  12. 基于php的超市仓库管理系统
  13. 7 款常用的 PostgreSQL GUI 工具测评
  14. vue-cli 开启js代码压缩和代码分割
  15. 轻松掌握计算机视觉三维重建的几何基础:坐标系与关键矩阵(基础矩阵、本质矩阵、单应矩阵)
  16. Java学习笔记(五):Complex类的设计及加减乘除运算的实现
  17. untiy 监听屏幕点击 物体(实现)
  18. 【鸿蒙学院】鸿蒙App开发直播学员提问与回答
  19. 建立KMS服务器,激活WIN、office
  20. 微信公众号认证全过程

热门文章

  1. Scroller类的源码分析以及使用
  2. burpsuite代理
  3. win7怎么看计算机显卡内存大小,Win7系统怎么看显存?
  4. 中国剩余定理(孙子定理)(模板)
  5. 中医针灸学综合练习题库【7】
  6. 京东云主机 mysql_京东云所有地域正式支持 MySQL 8.0!
  7. 关于BCM61650IFB1G
  8. Python智能机械助理
  9. 设计出python_《设》字意思读音、组词解释及笔画数 - 新华字典 - 911查询
  10. 【牛腩】-母版图片不显示问题