Slide 6
Slide 6 text
Flink MiniCluster: What’s the Size of my JVM?
→ JVM doesn’t start with -Xmx60m, but it does with -Xmx65m.
Exception in thread "main" java.lang.OutOfMemoryError: Could not allocate enough memory segments for NetworkBufferPool (required (MB): 64,
allocated (MB): 61, missing (MB): 3). Cause: Direct buffer memory. The direct out-of-memory error has occurred. This can mean two things:
either job(s) require(s) a larger size of JVM direct memory or there is a direct memory leak. The direct memory can be allocated by user
code or some of its dependencies. In this case 'taskmanager.memory.task.off-heap.size' configuration option should be increased. Flink
framework and its dependencies also consume the direct memory, mostly for network communication. The most of network memory is managed by
Flink and should not result in out-of-memory error. In certain special cases, in particular for jobs with high parallelism, the framework
may require more direct memory which is not managed by Flink. In this case 'taskmanager.memory.framework.off-heap.size' configuration
option should be increased. If the error persists then there is probably a direct memory leak in user code or some of its dependencies
which has to be investigated and fixed. The task executor has to be shutdown...
at org.apache.flink.runtime.io.network.buffer.NetworkBufferPool.(NetworkBufferPool.java:149)
at org.apache.flink.runtime.io.network.NettyShuffleServiceFactory.createNettyShuffleEnvironment(NettyShuffleServiceFactory.java:173)
at org.apache.flink.runtime.io.network.NettyShuffleServiceFactory.createNettyShuffleEnvironment(NettyShuffleServiceFactory.java:128)
at org.apache.flink.runtime.io.network.NettyShuffleServiceFactory.createNettyShuffleEnvironment(NettyShuffleServiceFactory.java:97)
at org.apache.flink.runtime.io.network.NettyShuffleServiceFactory.createShuffleEnvironment(NettyShuffleServiceFactory.java:78)
at org.apache.flink.runtime.io.network.NettyShuffleServiceFactory.createShuffleEnvironment(NettyShuffleServiceFactory.java:57)
at org.apache.flink.runtime.taskexecutor.TaskManagerServices.createShuffleEnvironment(TaskManagerServices.java:446)
at org.apache.flink.runtime.taskexecutor.TaskManagerServices.fromConfiguration(TaskManagerServices.java:304)
at org.apache.flink.runtime.taskexecutor.TaskManagerRunner.startTaskManager(TaskManagerRunner.java:631)
at org.apache.flink.runtime.minicluster.MiniCluster.startTaskManager(MiniCluster.java:755)
at org.apache.flink.runtime.minicluster.MiniCluster.startTaskManagers(MiniCluster.java:736)
at org.apache.flink.runtime.minicluster.MiniCluster.start(MiniCluster.java:457)
at co.decodable.PassthroughKafka.initMiniClusterWithEnv(PassthroughKafka.java:62)
at co.decodable.PassthroughKafka.main(PassthroughKafka.java:44)