Hi all, we have a Flink cluster running in session...
# troubleshooting
g
Hi all, we have a Flink cluster running in session mode and has about 25 jobs running on the cluster with 80 pods. I have a hunch that Flink doesn't commit offsets correctly at regular intervals causing the consumer lag to shoot up for sometime and rapidly coming down. Is there a setting that I can look at or is there a metric which shows at what times flink consumer committed Kafka offsets?
d
If Flink is checkpointing, then the offsets are committed when the checkpoint is complete.
g
Yes, I thought so too - but checkpoints are failing for some reason at random times. Will it cause performance issues if we checkpoint at a higher rate? We're currently checkpointing every 30 seconds.
d
Do checkpoints fail because they timeout ?
g
Yes
d
What version of Flink are you using ?
g
1.14.3
d
When checkpoints fail, does the job immediately fail and restart ?
g
They restart. The checkpoint eventually is saved and job continues to run.
d
You might try increasing the checkpoint timeout, or increase
execution.checkpointing.tolerable-failed-checkpoints
. That way the job will be less likely to fail and restart, which should help.
I’m guessing the consumer lag shoots up every time the job fails, and catches up again after the restart has re-ingested the records since the last checkpoint. Given you are experiencing checkpoint failures, I wouldn’t suggest increasing the checkpoint frequency. It could be interesting for you to try the changelog state backend with more frequent checkpoints, but you should probably upgrade to 1.16 before thinking about that.
g
Oh ok, we’re currently using HashMap State Backend
d
Interesting. How large are the checkpoints?
g
About
500KB
@David Anderson we're seeing this spiky nature of offsets commits from Flink It is causing our alerts to falsely trigger and create an incedent.
d
Are the spikes correlated with checkpoint failures?