2008/8/22

ICS OutofMemory exception in AIX or latter

FROM <http://www-1.ibm.com/support/docview.wss?rs=693&context=SSBTEG&dc=DA490&dc=DA4A10&dc=DB520&dc=DA4A30&dc=DB530&dc=DA480&dc=D700&dc=DA4A20&dc=DB560&dc=DA440&dc=DA460&dc=DA430&dc=DA470&dc=DB550&dc=D600&dc=DB600&dc=DA420&dc=DA500&dc=DA410&dc=DB540&dc=DA400&dc=DB700&dc=DB510&uid=swg21246680&loc=en_US&cs=utf-8&lang=en>

Problem(Abstract)
WebSphere® InterChange Server 4.3.0.x runs out of memory frequently on AIX® 5.2 or 5.3.

Cause
The java.lang.OutofMemory exception in the InterchangeSystem.log or ics_manager.log can caused by several things. This technote addresses situations where the WebSphere InterChange Server JVM might require some tuning on AIX, which in turn might require to move to a higher AIX memory model.

To understand more about using higher AIX memory models, please see the link in the Related URL section of this technote.


Resolving the problem
Follow these steps to tune AIX:
1. Change the value for Xmx to either 756 Mb or 1024 Mb, or higher if the application you are using requires it.

To change the Xmx value, change the CW_MEMORY_MAX value in the /bin/CWSharedEnv.sh file. The excerpt of the CWSharedEnv.sh file is as shown below:
# For ICS server the "maximum Java heap size" is defined by this variable
CW_MEMORY_MAX=756

2. In the ics_manager script, located in the /bin/ directory, comment out the following section:
os_seg_size=256
num_segs=`expr 9 - $CW_MEMORY_MAX / $os_seg_size`
ldr_var=0x"$num_segs"0000000
export LDR_CNTRL=MAXDATA=$ldr_var

Add the following section:
export IBM_JAVA_MMAP_JAVA_HEAP=true
export LDR_CNTRL=MAXDATA=0xA0000000@DSA

The script file should look like this after you have made the changes:
--------------------
### OS is being setup in CWSharedEnv.sh
### On AIX we have to setup this variable for the JVM to use
if [ "${OS}" = "AIX" ]
then
# os_seg_size=256
#num_segs=`expr 9 - $CW_MEMORY_MAX / $os_seg_size`
#ldr_var=0x"$num_segs"0000000
#export LDR_CNTRL=MAXDATA=$ldr_var
export IBM_JAVA_MMAP_JAVA_HEAP=true
export LDR_CNTRL=MAXDATA=0xA0000000@DSA
fi
exec $JAVA_ICS -classpath "${CWCLASSES}" ServerWrapper -s${SERVERNAME} ${var_options} -design
) >${var_outputlog} 2>&1 &
PROCESSID=$!
echo "Logging output to ${var_outputlog}"

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

Things to be aware of when using this memory model on AIX:

1. Ensure that your system is not paging after you make the preceding changes. Your applications can run more slowly if the system starts paging.

2. Use large heap values (Xmx) around 2 GB with caution and only if necessary. For higher values of Xmx ( over 1.75 GB), 0xB0000000@DSA is recommended to provide the highest possible native heap space (the number 1.75 GB is just an approximation, because there can be several threads used in the process). Ensure that your system is not paging after you make the change.

3. The OutofMemory exception can be caused due to fragmentation as well. If that is the case, increasing the Xmx value might not help. You will need to take other steps to address that issue.
Refer to the following link for a description of the steps you can take:
http://www-128.ibm.com/developerworks/java/jdk/diagnosis/142.html

4. As the Xmx is increased to higher values, the garbage collection cycles can take longer.

Related information
Getting more memory for java applications on AIX

沒有留言:

JPA+complex key+custom Query

  來源: https://www.cnblogs.com/520playboy/p/6512592.html   整個來說,就是有複合主鍵 然後要使用  public interface XxXXxx DAO extends CrudRepository<Tc...