Home / Flink / Checkpoints and state
Flink: Checkpoint expired before completing
org.apache.flink.runtime.checkpoint.CheckpointExceptionCheckpoint expired before completing.A checkpoint did not finish within execution.checkpointing.timeout (10 minutes by default), so the JobManager aborted it. One expired checkpoint is harmless; repeated ones usually mean backpressure is delaying checkpoint barriers or state is too large to upload in time.
Common causes
- Backpressure: barriers queue behind records in slow operators and reach the sinks too late.How to confirm: In the Web UI, look at the Checkpoints tab. A large "Alignment Duration" or a long gap between "Trigger Time" and the first acknowledgement, plus operators marked as backpressured, points here.
- State upload is too slow: very large state or a slow or throttled checkpoint storage (HDFS, S3).How to confirm: Checkpoint details show most subtasks acknowledged quickly but "Async Duration" is long for a few subtasks with large "Checkpointed Data Size".
- A single subtask is stuck, for example a blocking call in a user function or a sink waiting on an external system.How to confirm: One subtask never acknowledges while others do. Take a thread dump of that TaskManager from the Web UI.
How to fix it
Remove the backpressure first: scale out the slow operator, fix data skew, or speed up the external system it calls. A longer timeout alone only hides the problem.
Enable unaligned checkpoints so barriers can overtake buffered records under backpressure.
| Setting | Default | Note |
|---|---|---|
execution.checkpointing.unaligned.enabled | false |
If checkpoints are slow but healthy (large state, steady progress), raise the timeout and use incremental checkpoints with RocksDB.
| Setting | Default | Note |
|---|---|---|
execution.checkpointing.timeout | 10 min | |
execution.checkpointing.incremental | false |
Where the message comes from
CheckpointFailureReason.javainapache/flinkatrelease-2.3.0- Message checked in Flink 2.3.0