![]() You can add this hint to the SAP Java buildpack via the JBP_CONFIG_JAVA_OPTS environment variable and the stack_threads property as documented here.Ĭause 3 – High native memory consumption: In some cases the JVM requires more native memory than the memory calculation of the buildpack accounted for. Recommendation: Verify the maximum number of threads used by your JVM (as explained above) and provide a hint to the Java buildpack with the number of threads to be expected. Especially under a high load, a high number of threads might be processing requests. For example, it doesn’t make sense to explicitly request a 1G heap if the overall container has only 1G of size.Ĭause 2 – High thread count: A very high thread count can lead to memory errors at the container level when the sum of memory consumed by every thread (via -Xss) exceeds the available memory of the container. ![]() MitigationĬause 1 – Inappropriate memory flags: Are there any JVM memory flags provided to the Java application which are incompatible with the container? Recommendation: If memory flags were provided manually to the JVM, you should review and evaluate them. Note the (out of memory) at the end, which indicates that the container itself ran out of memory (and not the JVM). Getting events for app spring-music-oom in org cp-performance / space demo as event actor description When calling cf logs APP_NAME -recent, you see something like this: The easiest way to identify a container out of memory situation is via the Cloud Foundry command line tool. ![]() By default, the Java buildpack expects and reserves enough memory for 250 * 1M (default value for -Xss). Another situation we have observed is that a JVM was scheduling more threads than memory was reserved for via the -Xss flag. This can happen when the JVM was given memory flags that configure it to use more memory than is available in the container. Container Out Of MemoryĪs mentioned before, a container out of memory situation occurs when your JVM tries to use more memory than your container quota allows. Since troubleshooting for both situations is significantly different, it’s crucial to understand which out of memory error you are facing to apply the correct countermeasures. ![]()
0 Comments
Leave a Reply. |