tillrohrmann commented on a change in pull request #11408: 
[FLINK-15989][FLINK-16225] Improve direct and metaspace out-of-memory error 
handling
URL: https://github.com/apache/flink/pull/11408#discussion_r393771271
 
 

 ##########
 File path: flink-core/src/main/java/org/apache/flink/util/ExceptionUtils.java
 ##########
 @@ -48,6 +49,27 @@
        /** The stringified representation of a null exception reference. */
        public static final String STRINGIFIED_NULL_EXCEPTION = "(null)";
 
+       public static final String TM_DIRECT_OOM_ERROR_MESSAGE = String.format(
+                       "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 '%s' 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 '%s' configuration option " +
+                               "should be increased. If the error persists 
then there is probably a direct memory leak which has to " +
+                               "be investigated and fixed. The task executor 
has to be shutdown...",
+               TaskManagerOptions.TASK_OFF_HEAP_MEMORY.key(),
+               TaskManagerOptions.FRAMEWORK_OFF_HEAP_MEMORY.key());
+
+       public static final String TM_METASPACE_OOM_ERROR_MESSAGE = 
String.format(
+               "The metaspace out-of-memory error has occurred. This can mean 
two things: either job requires " +
 
 Review comment:
   ```suggestion
                "The metaspace out-of-memory error has occurred. This can mean 
two things: either the job requires " +
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to