In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article is to share with you about the eight reasons for JVM sending OOM and what the solutions are. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article. Without saying much, let's take a look at it.
1. Frequency of Java heap space occurrence: 5 stars cause unable to allocate objects in the Java heap. The throughput increases the application inadvertently saves the object reference, and the object cannot be overused finalizer by the GC recycling application. Finalizer objects cannot be immediately recycled by GC. Finalizer is called by the daemon thread that ends the queue service, and sometimes the processing power of the finalizer thread cannot keep up with the growth of the end queue solution-Xmx increases heap size to repair memory leaks in applications. GC overhead exceeds the limit frequency: due to 5 stars, the Java process spends 98% of its time garbage collection, recovering less than 2% of the heap space Finally, this has been the case for five consecutive (compile-time constants) garbage collection. The solution uses-Xmx to increase heap size-XX:-UseGCOverheadLimit removes the GC overhead limit and fixes memory leaks in the application 3. 5. The requested array size exceeds the virtual machine limit frequency: 2 stars cause the application attempts to allocate an array solution that exceeds the heap size using-Xmx to increase the heap size repair application allocates a large array of bug4. Frequency of occurrence in Perm gen space: the cause of three stars
The Perm gen space contains:
JIT compiler optimization of class names, fields, methods and class-related object arrays and type arrays
When the Perm gen space is exhausted, an exception is thrown.
The solution uses-XX: MaxPermSize to increase the Permgen size without restarting the application deployment application may cause this problem. Restart JVM to solve 5. Metaspace frequency: the cause of 3 stars is changed from Java 8 to Metaspace, and class metadata (called metaspace) is allocated in local memory. If the metaspace is exhausted, the exception solution is to use the command line setting-XX: MaxMetaSpaceSize to increase the metaspace size and cancel-XX: maxmetsspacedize to reduce the Java heap size, provide more free space for the MetaSpace, allocate more memory for the server, maybe the application bug, repair bug6. Unable to create a new native thread frequency: 5 stars caused by insufficient memory to create a new thread. Because the thread is created in native memory, reporting this error indicates that the native memory space solution allocates more memory to the machine to reduce Java heap space to fix thread leaks in the application. Increase operating system level restrictions ulimit-a user processes increase (- u) 1800 use-Xss to reduce thread stack size 7. Kill process or child process frequency: 1 star cause kernel task: insufficient memory Terminator, in the case of very low available memory will kill the process solution to migrate the process to a different machine to add more memory to the machine
Unlike other OOM errors, this is triggered by the operating system, not JVM.
8. Occurrence frequency of stack_trace_with_native_method: 1 star cause native method (native method) assigns the stack trace information of failed printing, the top frame is the native method solution using the operating system local tools to diagnose the above are the 8 reasons why JVM sends OOM and what the solution is, the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.