Hi Team! I have problem with using `rocksdb`. So I...
# troubleshooting
e
Hi Team! I have problem with using
rocksdb
. So I have a feature that requires storing large state. Specifically, I need to have
Sliding window(4h size, 1min hop).
When I run feature with rocksdb I notice following problems: 1. After some time checkpoints stop working. It says checkpoint “in_progress” for 10min until checkpoint is expired. During this time watermark is not propagated and feature is just stuck. 2. Rocksdb files occupy much less space compared to in-memory state size. Probably it is just due to clever compaction, but maybe it indicates some problems. For each of 6 taskmanagers heap memory is 3.63Gb and gets filled up after 30 min and checkpoint size can reach 3-4Gb. With rocksdb each taskmanager stores only ~50-70mb. And checkpoints are only 300-400Mb. Watermarks obviously progress much slower. What have I tried: • If I turn off rocksdb backend, checkpoints work perfectly, uploading takes 2-10s. But, after 30 min taskmanagers are out of heap memory. (Tried 6Gb, 8Gb and increased heap memory fraction at the cost of reducing managed memory) • I tried this approach with Flink 1.17.1 and 1.18.1 and got same outcome • I also tried
state.backend.incremental
with rocksdb but it didn’t help. • And in case it is idle source problem, I’ve set ‘scan.watermark.idle-timeout’=‘1min’, in my source. Setup: • Flink 1.17.1 & tried 1.18.1 • Source connector is Kafka stream • parallelism is 6, same as number of kafka partitions to avoid idle source • checkpoints are saved on s3 Has anyone faced same issue? Or any advice on how to approach it? Thanks!
r
Hi Liza, Facing some similar issues getting out of the heap (not using rocksdb). Did you manage to sort that out? Cheers,
e
Hey Rui, Yes, I rewrote query a little bit with deduplication and problem was gone. Not sure what caused it.
r
New Flink 1.19 has a feature that allows us to selectively choose specific sources / sinks TTL so it can in for example process an unbounded stream without storing the state endlessly, thus not exhausting heap memory. https://cwiki.apache.org/confluence/display/FLINK/FLIP-373%3A+Support+Configuring+Different+State+TTLs+using+SQL+Hint