Skip to Content
avatar image
Former Member

/work/std_server0.out java.lang. OutOfMemoryError! : Java heap space

Hi ... we have an issue in one of our portal:

/work/std_server0.out java.lang. OutOfMemoryError! : Java heap space

/log/defaultTrace.13.trc #1#java.lang. OutOfMemoryError!

Could you please help me to know what i can do to avoid this error?

Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Jan 17, 2011 at 10:01 PM

    Hello,

    I would like to add to the points Tom raised. Some basic analysis can be done by reviewing the garbage collection of the system just before it crashed. Iu2019m not sure if the files will still be available but you should look for the std_Server0.out file that corresponds to the time the issue occurred. These files are created in cycles so it may have been overwritten. Older versions of the file have slightly different extensions. There shouldnu2019t be more than three or four versions of the file so it wonu2019t take long to check.

    If a java server is about to have an out of memory it will try complete a full garbage collection before the issue occurs. Once last attempt on the JVMu2019s part to free up space. You can review the output at this time and it will tell you what area is overloaded. You can refer to Tomu2019s guide more information. Also Suns guide is excellent, just google:u2018Tuning Garbage Collection with the 5.0 Java[tm] Virtual Machineu2019 to find a copy.

      If this is a time of heavy user usage perhaps the next step should be to add more memory to the java servers The default on installation is 2GB but I believe 4GB is being recommended for most applications at this time.

    If you need to do a deeper analysis I suggest configuring the system to trigger a heap dump and using the MAT tool

    http://sapnwnewbie.blogspot.de/2010/10/installing-memory-analyser-tool-for.html

    to analyse the file. Details on the MAT tool can be found at Application Server » Memory Analyzer in the welcome thread within SDN.

    KR,

    John

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 30, 2010 at 06:40 AM

    Hi,

    As per the logs there is no memory available on your server, try to reduce the Heap memory. And check your parameter as per SAP note 723909.

    Thanks

    Sunny

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Check the OS space and the heap space you have given in configtool, if it's 32 bit 2 gb is the max if it;s 64 you can give more memory but you need to keep in check with OS total memory...

      Redue the memory and start the system...

  • Jan 05, 2011 at 03:20 PM

    Hi,

    the memory consumed by the AS JAVA must be available physically.

    You can do some things to solve the problem...

    1. increase RAM on the portal machine

    2. if you use more than one server processes: delete one or more of them. I think one server process needs approx. 2 GBs of RAM...

    3. Downsize the Memory Settings of the AS Java (dispatcher and/or server processes) in the Config Tool; But that's bad for the performance.

    4. Install additional Dialog instances for the portal (with a web dispatcher in front of it for load balancing) on additional servers

    best regards, Martin

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 07, 2011 at 06:46 AM

    Hello Daniel

    While you got some responses to your question, it is insufficient to answer your question without further information.

    I'm currently writing a series of blogs on troubleshooting Java based SAP systems.

    I think it would be interesting for you to read the first parts to get a better understanding how Java works, especially the part how Java garbage collection works.

    Available parts so far

    [SAP Java Administration - Troubleshooting part I - java as a programming language|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22576] [original link is broken] [original link is broken] [original link is broken];

    [SAP Java Administration - Troubleshooting part II - understanding garbage collection basics|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22707] [original link is broken] [original link is broken] [original link is broken];

    [SAP Java Administration - Troubleshooting part III - Java VM settings basics|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22803] [original link is broken] [original link is broken] [original link is broken];

    [SAP Java Administration - Troubleshooting part IV - The basic tools|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/22927] [original link is broken] [original link is broken] [original link is broken];

    In general the error means your Portal has ran out of memory.

    An outofmemory error can occur due to a lack of memory, then the question becomes why is there a lack of memory ?

    There are multiple possible answers to this question

    An outofmemory error can occur due to a memory leak (bug in software), then the question becomes in which component ?

    To be able to answer any of those questions, a root cause analysis should be performed to determine the actual root cause of the issue. Enlarging the memory without proper investigation is an option but it's not a solution for sure as you don't know what the root cause is.

    A memory leak will consume whatever memory you add (by enlarging) to the heap and will still cause a crash situation.

    Another recommendation for you is to put the Solution Manager Diagnostics scenario in place (Wily Introscope, Diagnostics Agent and so on) so you can have a better view on your Enterprise Portal and it's health status.

    Kind regards

    Tom

    Add comment
    10|10000 characters needed characters exceeded