the heap size in weblogic

Upload: vijraajeev5534

Post on 03-Jun-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/11/2019 The Heap Size in weblogic

    1/6

  • 8/11/2019 The Heap Size in weblogic

    2/6

    methods and constructors. When the permanent generation is full, the application will fail to load a class or to

    allocate an interned string, and an OutOfMemoryError will be thrown with the following error message:

    java.lang.OutOfMemoryError: PermGen space

    Native memoryis the virtual memory managed by the operating system. The Java Native Interface (JNI) code or

    the native library of an application and the JVM implementation allocate memory from the native heap. An

    OutOfMemoryError will be thrown when an allocation in the native heap fails. For example, the following errormessage indicates insufficient swap space, which could be caused by a configuration issue in the operating system or

    by another process in the system that is consuming much of the memory:

    java.lang.OutOfMemoryError:request bytes for .Out of swap space?

    An insufficient memory problem could be due Either to a problem with the configuration ie the application really needs that much memory. Increase the heap size

    Or to a performance problem in the application that requires we to profile and optimize to reduce the memory use.

    Memory leaks:The JVM is responsible for automatic memory management, which reclaims the unused memory for the application.However, if an application keeps a reference to an object that it no longer needs, the object cannot be garbagecollected and will occupy space in the heap until the object is removed. Such unintentional object retention isreferred to as a memory leak. If the application leaks large amounts of memory, it will eventually run out of memory,

    and an OutOfMemoryError will be thrown.

    Read more: http://www.wikiconsole.com/wiki/?tag=weblogic-realtime#ixzz2OL4tW0Gz

    Solution for Memory Issue:Trigger the Garbage collection from Admin console, restart the server if GC doesnt help

    Read more: http://www.wikiconsole.com/wiki/?tag=weblogic-realtime#ixzz2OL4xgoyJ

    java.lang.OutOfMemoryError: GC overhead limit exceeded" exception with

    Sun JDK 1.6byadmin underRealtime Issues,WebLogic Server

  • 8/11/2019 The Heap Size in weblogic

    3/6

    SolutionYou can avoid the above java.lang.OutOfMemoryError: GC overhead limit exceeded exception by disabling the GCoverhead limit feature in Sun JDK 1.6 by adding the following argument to the start script of JVM:-XX:-UseGCOverheadLimit

    However, please note that disabling the overhead limit only avoids getting the OutOfMemoryError at an early stage.The OutOfMemoryError is very likely to be thrown at a later stage, because it does not remove the underlyingproblem. You should still look into your application and JVM settings to find the cause of GC taking an excessivelylong time.

    Read more: http://www.wikiconsole.com/wiki/?tag=weblogic-realtime#ixzz2OL59BUK8

    ORACLE JRockit and Stack Overflow Troubleshootingbyadmin underRealtime Issues,WebLogic Server

    First of all, a StackOverflowError is an instance of a JVM Error, and from the very reference of thejava.lang.StackOverflowError , a JVM might not be able to survive when this condition happens.

    You might thus discover the Stack Overflow condition in your production application from either repeating coredumping, and/or alert in your application logs (typically, a StackOverflowError appears in the application logs)WHAT TO DO

    When an ORACLE JRockit Java Virtual Machine dies unexpectedly, it attempts to create a short text file, namedjrockit..dump, by default in the directory from which the JVM was started (working directory). Then, theOperating System will create a core file on UniX/LinuX, and minidump on Windows.This text file (jrockit..dump) can be easily viewed in any text editor, and the number of StackOverflowError thathappened before the JVM died is displayed conveniently in the file.In addition, at the end of the crash report, provided the JVM died because of the StackOverflowError, the whole stacktrace (which can be extremely long) appears.In case the StackOverflowError appears in the application log, and the JVM survives this condition, and the stacktrace is not showing up in the logs, a specific verbosity tool can be turned on inside the JVM to report this condition:R27: $JROCKIT_HOME/bin/jrcmd verbosity

    set=stackoverflow=debugR28: $JROCKIT_HOME/bin/jrcmd verbosity

    set=exceptions=info

    After this command has been issued, when a Stack Overflow condition happens, the stack of the offending code pathis displayed in the stderr of the target JVM.You can redirect the output using the specific optional argument to the command abovefilename=The Xverbose:stackoverflow module was removed in R28. Instead Xverbose:exceptions was modified so that itprints full stack traces on errors. So if you run with Xverbose:exceptions, you will see all exceptions thrown (withoutstack traces) and see all StackOverflowErrors for example with stack traces. The verbosity example above takes thischange into account.POSSIBLE WORKAROUNDWhen the application has a particular need for a very long recursion, and it is desired this works seamlessly, you canincrease/tune the thread stack size for all the threads of the JVM using the command line flag-Xss:[km]Be aware that the JVM reserves that amount of space (plus a guard page) per thread in the JVM. As a JVM mightaccommodate hundreds or thousands of threads, this memory reserved area for thread stacks has to be removed tothe memory the heap can grow to.For instance, on a Windows 32 bits system limited to 2Gb processes, when the JVM handles 200 threads and youspecify -Xss:5m, this is 200*5=1000Mb = 1Gb of memory that the heap cannot use. In this specific example, the heapthus cannot grow beyond 1Gb because of the OS restriction on the maximum process size.The default stack size for a particular JRockit version is documented in the JRockit reference manual, and depends onthe OS and version of JVM.

    http://www.wikiconsole.com/wiki/?tag=weblogic-realtime#ixzz2OL59BUK8http://www.wikiconsole.com/wiki/?p=3354http://www.wikiconsole.com/wiki/?p=3354http://www.wikiconsole.com/wiki/?p=3354http://www.wikiconsole.com/wiki/?author=1http://www.wikiconsole.com/wiki/?cat=76http://www.wikiconsole.com/wiki/?cat=37http://www.wikiconsole.com/wiki/?cat=37http://www.wikiconsole.com/wiki/?cat=76http://www.wikiconsole.com/wiki/?author=1http://www.wikiconsole.com/wiki/?p=3354http://www.wikiconsole.com/wiki/?tag=weblogic-realtime#ixzz2OL59BUK8
  • 8/11/2019 The Heap Size in weblogic

    4/6

    Read more: http://www.wikiconsole.com/wiki/?tag=weblogic-realtime#ixzz2OL5EIbd1ORACLE

    JRockit and Stack Overflow Troubleshootingbyadmin underRealtime Issues,WebLogic Server

    First of all, a StackOverflowError is an instance of a JVM Error, and from the very reference of thejava.lang.StackOverflowError , a JVM might not be able to survive when this condition happens.You might thus discover the Stack Overflow condition in your production application from either repeating coredumping, and/or alert in your application logs (typically, a StackOverflowError appears in the application logs)WHAT TO DO

    When an ORACLE JRockit Java Virtual Machine dies unexpectedly, it attempts to create a short text file, namedjrockit..dump, by default in the directory from which the JVM was started (working directory). Then, theOperating System will create a core file on UniX/LinuX, and minidump on Windows.This text file (jrockit..dump) can be easily viewed in any text editor, and the number of StackOverflowError thathappened before the JVM died is displayed conveniently in the file.In addition, at the end of the crash report, provided the JVM died because of the StackOverflowError, the whole stacktrace (which can be extremely long) appears.In case the StackOverflowError appears in the application log, and the JVM survives this condition, and the stack

    trace is not showing up in the logs, a specific verbosity tool can be turned on inside the JVM to report this condition:R27: $JROCKIT_HOME/bin/jrcmd verbosity

    set=stackoverflow=debug

    R28: $JROCKIT_HOME/bin/jrcmd verbosity

    set=exceptions=info

    After this command has been issued, when a Stack Overflow condition happens, the stack of the offending code pathis displayed in the stderr of the target JVM.You can redirect the output using the specific optional argument to the command abovefilename=The Xverbose:stackoverflow module was removed in R28. Instead Xverbose:exceptions was modified so that itprints full stack traces on errors. So if you run with Xverbose:exceptions, you will see all exceptions thrown (withoutstack traces) and see all StackOverflowErrors for example with stack traces. The verbosity example above takes thischange into account.

    POSSIBLE WORKAROUNDWhen the application has a particular need for a very long recursion, and it is desired this works seamlessly, you canincrease/tune the thread stack size for all the threads of the JVM using the command line flag-Xss:[km]Be aware that the JVM reserves that amount of space (plus a guard page) per thread in the JVM. As a JVM mightaccommodate hundreds or thousands of threads, this memory reserved area for thread stacks has to be removed tothe memory the heap can grow to.For instance, on a Windows 32 bits system limited to 2Gb processes, when the JVM handles 200 threads and youspecify -Xss:5m, this is 200*5=1000Mb = 1Gb of memory that the heap cannot use. In this specific example, the heapthus cannot grow beyond 1Gb because of the OS restriction on the maximum process size.The default stack size for a particular JRockit version is documented in the JRockit reference manual, and depends onthe OS and version of JVM.

    Read more: http://www.wikiconsole.com/wiki/?tag=weblogic-realtime#ixzz2OL5EIbd1

    what is virtual ip?what is a proxy plugin, how will you configure it?What is a public ip and private ip?what do u mean by self signed certificate?what is wlnotdelete folder?what is xms, xmx parameters represent?Tell me about file structure in Unixhow do u know database server is up & running?what is the datastore ?

    http://www.wikiconsole.com/wiki/?tag=weblogic-realtime#ixzz2OL5EIbd1http://www.wikiconsole.com/wiki/?tag=weblogic-realtime#ixzz2OL5EIbd1http://www.wikiconsole.com/wiki/?p=3354http://www.wikiconsole.com/wiki/?p=3354http://www.wikiconsole.com/wiki/?p=3354http://www.wikiconsole.com/wiki/?author=1http://www.wikiconsole.com/wiki/?cat=76http://www.wikiconsole.com/wiki/?cat=37http://www.wikiconsole.com/wiki/?tag=weblogic-realtime#ixzz2OL5EIbd1http://www.wikiconsole.com/wiki/?tag=weblogic-realtime#ixzz2OL5EIbd1http://www.wikiconsole.com/wiki/?cat=37http://www.wikiconsole.com/wiki/?cat=76http://www.wikiconsole.com/wiki/?author=1http://www.wikiconsole.com/wiki/?p=3354http://www.wikiconsole.com/wiki/?tag=weblogic-realtime#ixzz2OL5EIbd1http://www.wikiconsole.com/wiki/?tag=weblogic-realtime#ixzz2OL5EIbd1
  • 8/11/2019 The Heap Size in weblogic

    5/6

    what is the said by said deplo?What is the conf .xml bot?Tell me about installation steps inweblogic server?Difference between managed server and unmanaged server?

    How will you configure a webserver to interact with a particular application server?

    These two questions very much important for me:

    --------------------------------

    1) What are your daily day to day activities?

    2) Describe the real time problems that u faced in your administration Career?

    --------------------------------

    3) Did u work with any tools which helps you to see the heap dump or thread dump?

    4) What is 202 error, 500 server errors?

    5) What is the generalized approach for Migration?

    6) What is the difference between L1, L2, and L3?

    The user submitted the request,

    7) When that request is on processing in the middle the server Crashes then what happens?

    8) How do you verify that you are using Horizontal clusters not a Vertical cluster?

    9) What is vertical and horizontal scaling and their Advantages and Dis-advantages (Key points)?

    10) How to check the multiple NIC in Unix or Linux?

    11) To specify the weight of a cluster member in which file we have to Modify?

    12) How do you find memory leaks? At what situation memory leaks OccurGive any examples? Is

    there any tool to find memory leaks?

    What are u r day to day activites

    1)

    -Web logic servers monitoring,

    -Health check,

    -JVM monitoring, GC pattern analysis,

    -WLS logs,

    -DB connection, Heap, Threads monitoring

    - System CPU, memory monitoring

    2) Describe the real time problems that u faced in your administration Career?

    JVM run as -server compiler, Xms, Xmx,

    NewSize(1/4th of Xmx) ,MaxpermSize, Permsize,

    GC collection policy, Large memory pages,Heap dump etc

    3)

    WLS run as production mode,

    Xms=Xmx, Define Permsize,

    Enable verboseGC,

    JDBC initial pool=Max pool size,Pool sixe>=sum of thread counts,Use prepared statement cache,

    define server reload and jsp page check =-1,

    Enable native IO,Cluster group define,

    Use memory replication,

    Separate multicast address for each cluster.

    http://www.wikiconsole.com/wiki/?page_id=3908http://www.wikiconsole.com/wiki/?page_id=3908
  • 8/11/2019 The Heap Size in weblogic

    6/6

    Do not add admin sever to cluster, do not target anything to admin server. etc.

    3 good interview questions which i came across recently :

    1) Consider box1 has node manager, admin server1 and managed server 1 & box2 has managedserver 2. Managed server 1 and managed server 2 are in cluster, on which box will the cluster be

    present, box1 or box2??

    2) What will be the effect if multicast ip is duplicated for 2 different

    applications in a network??

    3) What is the maximum memory limit in web logic??

    4) What is the maximum limit of Heap?

    5) What is xss?

    Max limit of heap should ideally be about 80-85% of available RAM on the machine