AdminServer under WebLogic 12.2.1.2.0 consumes more than defined -Xmx

Posted by Dirk Nachbar on Tuesday, November 07, 2017
In case you are observing that your AdminServer under Oracle WebLogic Server 12.2.1.2.0 consumes a lot more memory than your defined -Xmx size, you may hit the Oracle Bug 25665727.

In order to valid this, you just need to perform following steps, connect to your Server on which is running your WebLogic Server with your AdminServer.

Check the current defined -Xmx size

 ps -ef | grep AdminServer
oracle   12793 12738  0 Nov01 ?        00:23:22 /u00/app/oracle/product/java/current/bin/java -server -Xms768m -Xmx1536m -XX:PermSize=256m -XX:MaxPermSize=1024m -Dweblogic.Name=AdminServer -Djava.security.policy= . . .

Now valid with the top command the current RES size

# top -p <pid from above ps command>
top -p 12793

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
12793 oracle    20   0 9479852 6.187g   9908 S 0.000 19.69  23:22.72 java

As you can see, the RES size is 6.187 GB, which is around 4.6 GB more that the defined -Xmx size after an uptime of around 6 days !!

The next step is to take a heap dump with jmap

# jmap -dump:format=b,file=<file_name>.bin <PID from above ps command>
jmap -dump:format=b,file=AdminServer.bin 12793

Next transfer the AdminServer.bin file to your Desktop and open it with Eclipse Memory Analyzer (Eclipse MAT) https://www.eclipse.org/mat/

Under the option Actions you will find the menu "Duplicate Classes: Detect Classes loaded by multiple class loaders"


Click the menu "Duplicate Classes: Detect Classes loaded by multiple class loaders":


In case you will find a high count of CIE classes (oracle.com.cie.servicetable.impl.*), you are hitting the Bug 25665727.

Just download the Patch 25665727 https://updates.oracle.com/download/25665727.html and apply the Patch to your WebLogic Server Software Home.