Project: Flink (App Definition and Development / Streaming & Messaging)
File: mem_trouble.md

title: "Troubleshooting" weight: 6 type: docs aliases: /deployment/memory/mem_trouble.html /ops/memory/mem_trouble.html <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> If you see an IllegalConfigurationException thrown from TaskExecutorProcessUtils or JobManagerProcessUtils, it usually indicates that there is either an invalid configuration value (e.g. negative memory size, fraction that is greater than 1, etc.) or configuration conflicts. Check the documentation chapters or related to the memory components mentioned in the exception message. The exception usually indicates that the JVM Heap is too small. You can try to increase the JVM Heap size by increasing . You can also directly increase for TaskManagers or for JobManagers. {{< hint info >}} You can also increase the for TaskManagers, but you should only change this option if you are sure the Flink framework itself needs more memory. {{< /hint >}} The exception usually indicates that the JVM direct memory limit is too small or that there is a direct memory leak. Check whether user code or other external dependencies use the JVM direct memory and that it is properly accounted for. You can try to increase its limit by adjusting direct off-heap memory. See also how to configure off-heap memory for , and the which Flink sets. The exception usually indicates that is configured too small. You can try to increase the JVM metaspace option for or . This is only relevant for TaskManagers. The exception usually indicates that the size of the configured is not big enough. You can try to increase the network memory by adjusting the following options: If a Flink container tries to allocate memory beyond its requested size (Yarn or Kubernetes), this usually indicates that Flink has not reserved enough native memory. You can observe this either by using an external monitoring system or from the error messages when a container gets killed by the deployment environment. If you encounter this problem in the JobManager process, you can also enable the JVM Direct Memory limit by setting the option to exclude possible JVM Direct Memory leak. If is used and memory controlling is disabled: You can try to increase the TaskManager's . and memory controlling is enabled and non-heap memory increases during savepoint or full checkpoints: This may happen due to the `glibc` memory allocator (see ). You can try to add the `MALLOCARENAMAX=1` for TaskManagers. Alternatively, you can increase the . See also .