There was a post earlier with some one had a problem of out of memory error with flink.
The answer is to reduce flink managed memory from default 70% to may be 50%.
This error could be caused due to missing memory ;
or maintaining a local list by programmer so over using user allocated memory caused by heavy processing ;
or using a small jvm ,
Or System spends too much time on gc.
Out of memory has nothing to do flink or flink is not at fault.
This process is known as "pimping" flink.
also part of pimping is use to use local disk for memory spill.