cancel
Showing results for 
Search instead for 
Did you mean: 

Portal restarts intermittently

Former Member
0 Kudos

When I look at the available.log it shows several entries of unavailable times. I checked the logs under work directory and all i can see is entries like Java instance shutting down or starting up or stopping services but no details like what caused it.

I even checked the VM settings and they are as per SAP recommendations, the heap memory is 2gb for server nodes.

Any ideas what else I can check?

Accepted Solutions (0)

Answers (3)

Answers (3)

0 Kudos

Hi,

Is not recommended to use more than 2GB server nodes.

Instead of using a server node with 4GB you must use two with 2GB.

OutOfMemory errors usually doesn't happen because of misconfiguration in the parameters, as you seem to have all the parameters right.

This kind of errors happens when an application is allocating memory and not freeing it, it is called memory leak and in this cases you can use 100GB of memory and still will happen OutOfMemory errors.

What you can do is generate a heap dump using note 1004255 with the parameter -XX:+HeapDumpOnOutOfMemoryError and send the generated file for analysis.

I strongly recommend you to open a message in the support in component BC-JAS-COR and send this file to identify the root application causing the leak.

Edited by: Anderson Parreiras on May 11, 2010 3:37 PM

Former Member
0 Kudos

Is adding server node better than increasing heap size if you have enough memory?

Former Member
0 Kudos

Bill,

Again the answer will be it depends. There are many factors to it, load, type of applications etc. One recommendation is:

We recommend 2 GB of memory, but you could increase the size up to 3 GB or even 4GB without expected issues. We recommend only to 2 GB per server node, because of the way the Garbage Collection works. Every once in a while, when the tenured area of the memory is exhausted a full garbage collection is triggered. During full garbage collection all processes are frozen and only the garbage collection threads are running. Increasing the heap size increases the time needed to finish the full garbage collection and even though this process will be rarer with more heap, when it happen your server won’t process requests for some time. Therefore instead of increasing the heap size we recommend adding additional server nodes, which will utilize the memory that you have, but will also cover each other if one node is not available to process requests.

Thanks,

Naveed

0 Kudos

Hello,

Look for out of memory errors in the Java server logs. even with an optimal configuration I've had memory errors if there is a lot of activity on the portal.

Also I've had a problem where the portal processes lose connection to the message server for some reason and that prompts the Java server to re-start.

Again you should be able to see that either in the Java server logs or the dev_ files in the work directory.

regards

Garry

Former Member
0 Kudos

I see OutofMemory errors but the problem is I cant really tell if that is causing it for sure since there is no time stamp in the log.

for e.g in server0.log it shows like this :

#1.5^H#0003BA57F155003C0000000000005BB00004804B70B5CCDE#1266961408707#/System/Server/Critical##com.sap.engine.frame.Environment####n/a##7a9b231d20c411dfcc600

003ba57f155#SAP J2EE Engine|MS Socket Listener##0#0#Error#1#com.sap.engine.frame.Environment#Plain###FATAL: Caught OutOfMemoryError! Node will exit with exit

code 666#

On another note - What points should I take into consideration if I decide to increase the heap size.

Former Member
0 Kudos

Am not too sure about adjusting heap size although I seem to remember seeing an SAP Note that contained some recommendations.

However, regarding not being able to see the time of the errors in the logs, the date and time is shown if you use the standalone log viewer:

\usr\sap\SID\JC00\j2ee\admin\logviewer-standalone\logviewer.bat or logviewer.sh

Hope this helps!

Former Member
0 Kudos

Check following SAP notes:

[SAP Note 709140 - Recommended JDK and VM Settings for the WebAS630/640/7.0|https://websmp130.sap-ag.de/sap%28bD1lbiZjPTAwMQ==%29/bc/bsp/spn/sapnotes/index2.htm?numm=74141]

[SAP Note 723909 - Java VM settings for J2EE 6.40/7.0|https://websmp130.sap-ag.de/sap%28bD1lbiZjPTAwMQ==%29/bc/bsp/spn/sapnotes/index2.htm?numm=74141]

Thanks,

Naveed

Former Member
0 Kudos

Bill,

Heap memory of 2 GB is on paper but when the memory need increases beyond the configured value its going to crash and restart.

SAP recommends to keep the value for heap memory in real memory.

If you have additional memory you can increase it.

See the attached note links.

Link: [Note 723909 - Java VM settings for J2EE 6.40/7.0]

Link: [Note 1289240 - How to deal with out of memory errors]

Former Member
0 Kudos

Thanks for your replies.

Couple of questions:

1.In SAP note 723909, the formula for heap size specified is

#ServerNodes = (AvailableMemory / 2.5 GB) - considering I have 64 bit system

1. What is the AvailableMemory? Is it the total amount of RAM in the system?

2. I have 16GB of RAM and running only 1 server node. Does increasing the server node help outofmemory issues

3. What is the difference between Server heap size and Instance Heap size?

Thank you all

Former Member
0 Kudos

1. What is the AvailableMemory? Is it the total amount of RAM in the system?

Yes.

2. I have 16GB of RAM and running only 1 server node. Does increasing the server node help outofmemory issues

It depends on the type of load you have . Instead of increasing the heap size sometimes it is recommend adding additional server nodes, which will utilize the memory that you have.

3. What is the difference between Server heap size and Instance Heap size?

So under one instance you can have more then one nodes. Tthe Server heap size will the heap size at the node and the Instance Heap size for the whole instance.

Hope this helps.

Thanks,

Naveed

Former Member
0 Kudos

>

>

1. What is the AvailableMemory? Is it the total amount of RAM in the system?

> Yes.

not exactly, if you have other application/process running in the same server (e.g. database) , you shoud exclude memory for these application. available memory mean memory can be assigned to SAP Java instance.

>

2. I have 16GB of RAM and running only 1 server node. Does increasing the server node help outofmemory issues

> It depends on the type of load you have . Instead of increasing the heap size sometimes it is recommend adding additional server nodes, which will utilize the memory that you have.

>

yes, it really depends on type of load, can you elaborate which usage type or application is running on your system.

for example, if you have BI java swtich on, I definitely support you increase your heap size.

Also you need "real" analysis rather than gueses around here, you should look for someone who can execute heap dump analysis for you, e.g. using SAP memory analyzer (Eclipse Memory Analyzer).

>

3. What is the difference between Server heap size and Instance Heap size?

> So under one instance you can have more then one nodes. Tthe Server heap size will the heap size at the node and the Instance Heap size for the whole instance.

heap size refer to the size of java heap space allocated to a JVM instance (jave process), so for each java process in SAP cluster (instance), there is a corresponding heap space. the most significant processi is the server node (refer to SAP JAVA AS architecture), hence we alway refer heap size to the heap size of server node.

I never heard about instance heap size until today

> Hope this helps.

>

> Thanks,

> Naveed

former_member227283
Active Contributor
0 Kudos

Hi Bill,

Many times it not necessary to calculate the HEAP memory using the THUMB rule.

Some people in landscape having dialog instance on same server or some times they create more than 5 server nodes in there java instance , in such case this rule doesn't support.

So , the best way is that , you have to set the value on assumption basis for e.g in your landscape the heap memory is 2 gb , but it is not suffy you make it to 2.5 or 3 and check whether this satisfy the application requirment or not.

Thanks

Anil