How To Solve Out Of Memory Error In Weblogic
Contents |
By Luz Mestre-Oracle on Nov 11, 2014 OutOfMemoryError (OOM) is a common issue that we can see in any WebLogic Server environment.Here are some guidelines you can follow to troubleshoot the weblogic out of memory error permgen space issue:1. Have you tried increasing the heap size? This is the first
Weblogic Server Out Of Memory Error
thing you need to try to tune your environment, the issue will probably be fixed. Here is a nice Document that out of memory exception in weblogic server explains memory management for hotspot JDK (it mostly apply to recent versions): http://www.oracle.com/technetwork/java/javase/memorymanagement-whitepaper-150215.pdf 2. Have you tried the latest JDK of your version? Even you are using a certified JDK, older versions
Weblogic Memory Leak Detection
have several bugs that have been found along the years. These bugs can be related to GC algorithms, so trying to tune your JVM in an old version, you might not get the expected result. Also, the latest releases include several security fixes you might wnat to have in your environment. You can find all Oracle Java releases (including JRockit) here: All Java SE Downloads on MOS (Doc java.lang.outofmemoryerror alloclargeobjectorarray weblogic ID 1439822.1)3. Are you using 32 or 64 bit JVM ? If your environment is certified with 64 bit JVM, always consider using 64 bit JVM for scalability.4. What JVM and Operating System are you using? Depending on if you are using Hotspot/JRockit/ other JDK and also depending on your OS you can define the way you collect, gclogs, heapdumps, histograms. FAQ: JRockit and java.lang.OutOfMemoryError related issues (Doc ID 1290251.1) How to Troubleshoot Java Heap Memory Leak - "java.lang.OutOfMemoryError: Java heap space" (Doc ID 1236373.1) How to collect a heap dump? - https://blogs.oracle.com/LuzMestre/entry/how_to_collect_a_heap5. I getting stuck threads and OutOfMemoryError, What to troubleshoot first? You need to troubleshoot the OOM first. Frequent GC can cause huge GC pauses, then stuck threads can occur. Resources for Garbage Collection Performance Tuning (Doc ID 1572109.1)6. I am getting a JVM crash and OutOfMemoryError, What to troubleshoot first? You need to troubleshoot the OOM. After an OOM, the JVM is unstable, so a JVM crash can occur. Oracle WebLogic Server Support Pattern: Troubleshooting Out of Memory and Memory Leak Problems (Doc ID 877172.1) Enjoy! Category: Oracle Tags: crash hang java.lang.outofmemoryerror oom outofmemoryerror stucj threads Permanent link to this entry « Error Correct
JMX / WLST / WLDF Proxy Plugin / Web Servers Knowledge Sharing Miscellaneous 20 Nov/10 OutOfMemory Causes and First Aid Steps? by Jay SenSharma under Debug, JVM Tuning, Monitoring BufferEmailPrintHi All,
Weblogic 12c Memory Leak
Jay SenSharma In response to the Comment: http://middlewaremagic.com/weblogic/?p=4456#comment-2026 We developed a Post on Java
Java.lang.outofmemoryerror Java Heap Space In Weblogic
Heap. Thanks to "Swordfish" for querying us very important topic. . In most of the environments we usually see some java.lang.outofmemoryerror: getnewtla kind of Memory related issues like OutOfMemory/Server Slowless kind of things. most of the times it is related to the in accurate tuning of the JVM and some times it happens due to the https://blogs.oracle.com/LuzMestre/entry/how_can_i_fix_java Application Frameworks Bug/ In accurate tuning configuration or it may happen due to the Application Code as well ..like Object Leakin in the Application code. . NOTE: The pre requisit for this Post is that you are already aware of different Memory Spaces available as part of the Java Process..If Not then Please quickly review: http://middlewaremagic.com/weblogic/?p=4456 . Here we are going to see that what causes the OutOfMemory issues http://middlewaremagic.com/weblogic/?p=4464 and Why it happens along with some basic First Aid Steps to debug this kind of issues. What is OutOfMemory? An OutOfMemory is a condition in which there is not enough space left for allocating required space for the new objects or libraries or native codes. OutOfMemory can be divided in tow main categories: 1). OutOfMemory in Java Heap: This happens when the JVM is not able to allocate the required memory space for a Java Object. There may be many reasons behind this…like Point-1). Very Less Heap Size allocation. Means setting the MaxHeapSize (-Xmx) parameter to a very less value. . Point-2). The Leaking of Objects. Either the Application is not unreferencing the unused Objects or the Third part frameworks (Hibernate/Spring/Seam…etc) might not be releasing the references of the objects due to some inaccurate configurations. . Point-3). In Many cases it may be the reason that Application codes are getting the JDBC connections objects from the DataSource are not being released back to the Connection Pool. . Point-4). Garbage Collection strategy may be in correct according to the environmental/application requirements. . Point-5). In-accurate setting of Application/Frameworks Cache. Example: Exception in thread "Thread-10" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:2882) at java.lang.AbstractStringBuilder.expandCapacit
HomeTroubleshootingDifferent Out Of Memory Issues Different Out Of Memory Issues Divya December 30, 2010 Troubleshooting 14 Comments Tweet Pin It * Exception in thread "CompilerThread1" java.lang.OutOfMemoryError: requested 793020 bytes http://weblogic-wonders.com/weblogic/2010/12/30/different-out-of-memory-issues/ for Chunk::new. Out of swap space? Out of memory while reading in symbol table of /apps/bea/weblogic92/jdk1.5.0.18/opt/java1.5/jre/lib/PA_RISC2.0/server/libjvm.sl ( 0) 0xc8461230 [/apps/bea/weblogic92/jdk1.5.0.18/opt/java1.5/jre/lib/PA_RISC2.0/server/libjvm.sl] ( 1) 0xc80a5fec [/apps/bea/weblogic92/jdk1.5.0.18/opt/java1.5/jre/lib/PA_RISC2.0/server/libjvm.sl] ( 2) 0xc7f00420 http://narayanasetti.blogspot.com/2014/03/oom.html [/apps/bea/weblogic92/jdk1.5.0.18/opt/java1.5/jre/lib/PA_RISC2.0/server/libjvm.sl] ( 3) 0xc7f00ca0 [/apps/bea/weblogic92/jdk1.5.0.18/opt/java1.5/jre/lib/PA_RISC2.0/server/libjvm.sl] ( 4) 0xc8368d08 [/apps/bea/weblogic92/jdk1.5.0.18/opt/java1.5/jre/lib/PA_RISC2.0/server/libjvm.sl] ( 5) 0xc005b2e4 __pthread_body + 0x44 [/usr/lib/libpthread.1] ( 6) 0xc0065574 __pthread_start + 0x14 [/usr/lib/libpthread.1] Java out of memory messages out of are marked with pid: 13828 in /var/adm/syslog/syslog.log. Possible causes: - not enough swap space left, or - kernel parameter MAXDSIZ is very small. Solution: Although it appears that an OutOfMemoryError is thrown this apparent exception is reported by the HotSpot VM code when an allocation from the native heap failed and the native heap may out of memory be close to exhaustion. The message indicates the size (in bytes) of the request that failed and also indicates what the memory is required for. In some cases the reason will be shown but in most cases the reason will be the name of a source module reporting the allocation failure. If an OutOfMemoryError with this error is thrown it may require using utilities on the operating system to diagnose the issue further. Examples of issues that may not be related to the application are when the operating system is configured with insufficient swap space, or when there is another process on the system that is consuming all memory resources. If neither of these issues is the cause then it is possible that the application is failed due to native leak; for example, application or library code is continuously allocating memory but is not releasing it to the operating system. For more information: http://java.sun.com/j2se/1.5/pdf/jdk50_ts_guide.pdf The recommendation for swap space size in the
Memory size of the JVM = Heap Memomry + Native MemoryHeap Memeory - Its used by applicationNative Memory - Its uused by JVM internal purpose like running GC,creating threads..etc.So OutOfMeomry can happen on either Heap or Native memory.a.) Heap Memory issues can be given by bad code - like code doesn't relese the memory properly and it will have reference to the object which is no more used - so we need to enable the heap dump to get the information gather the memory foot prints in the heap.We can enable the heapdump on using below parameter as a startup argument-XX:+HeapDumpOnOutOfMemoryErrorThe above command will create a dump which can be analyzed using MAT tool, this tool will say which objects are holding more memory then we can work with development team to get the code fixed.Sometime may the app needs more heap memory,so we can fix this issue by increasing the heap size.b.) Native Memory issue can be given by third party library code or jndi - so this needs to be worked with that third party code owner to get the issue fixed.2. OutofMemory errros are different for different JVM/JDK.Sun HotSpot - OutOfMemory error can happen on Heap memory,Perm generation and Native memoryJrockit - OutOfMemory error can happen on Heap memory and Native Memory as there is a no perm generation in jrockit which is part of Native memory itself.