jQuery in Action, 2nd edition
The moose likes Web Services and the fly likes axis2 leading to JVM , outOfMemory Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "axis2 leading to JVM , outOfMemory " Watch "axis2 leading to JVM , outOfMemory " New topic
Author

axis2 leading to JVM , outOfMemory

K Srinivasan
Ranch Hand

Joined: Mar 08, 2010
Posts: 34
hi,
we have a web service call on one of our application layers.
we are using WAS 6.1 and Apace Axis2 1.5 ,
The problem is that the memory used by JVM keeps on increasing , finally leading to a restart of the JVM,
On analysing the heap dump , the problem was found to be with the following classes :

com.ibm.xml.xlxp.api.stax.xml.streamReaderImplementation
and com.ibm.xlxp.api.util.UnSynchronizedBag.

Is this a bug with the Axis2 ?

Any help would be appreciated.
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Sound like it could be a bug in your web service. Are the application server and the Axis engine running in the same JRE?
K Srinivasan
Ranch Hand

Joined: Mar 08, 2010
Posts: 34
yes they are on the same jre.
Well, the same code is running on a different project without issues, so i guess shouldn't be an issue with the code
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
What do you mean by "the problem was found to be with the following classes" - what did the heap dump analysis tell you?
K Srinivasan
Ranch Hand

Joined: Mar 08, 2010
Posts: 34
Hi,

tthe heap dump analysis shows a memory leak due to the
com.ibm.xml.xlxp.api.stax.xml.streamReaderImplementation
and com.ibm.xlxp.api.util.UnSynchronizedBag.



641,360 (0%) [336] 38 com/ibm/xml/xlxp/api/stax/XMLStreamReaderImpl
0xa4fd1918
25,216 (0%) [280] 29 com/ibm/xml/xlxp/api/stax/StAXDTDScanner
0xa58a49e0
641,360 (0%) [336] 38 com/ibm/xml/xlxp/api/stax/XMLStreamReaderImpl
0xa4fd1918

Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
I have no idea what those numbers mean (maybe you meant to explain them?), but "0%" doesn't sound problematic.
subodh k kumar
Greenhorn

Joined: Aug 19, 2009
Posts: 16
What is the heap size defined in your project . Is it the same as other project ? i think provided logs are not good enough to suggest any thing.please provide more log.


SCJP1.4 , SCWCD 5
K Srinivasan
Ranch Hand

Joined: Mar 08, 2010
Posts: 34
@Lester :

I reviewed the heap dump again ,
there are instances of com.ibm.xlxp.api.util.UnSynchronizedBag which consume about 10% of the heap.

This is a analysis is by the App Server Vendor :
build up of XMLStreamReader instances in UnsynchronizedBag is usually a sign that the component(s) using StAX are failing to call close() on them. In the WSFP, calling close() on XMLStreamReader instances is a hard requirement. Failure to call close() may result in a leak.


@subodh
The heap size is same.
The intial heap size is 512MB and Max Heap size is 1024 MB
The heap size keep on increasing even after gc.
What other logs do you need ??

Thanks
Lester Burnham
Rancher

Joined: Oct 14, 2008
Posts: 1337
This is odd - Axis2 comes with its own StAX implementation (in the com/ctc/wstx and org/codehaus/stax2 packages), so I wouldn't think that it uses IBM's implementation.
K Srinivasan
Ranch Hand

Joined: Mar 08, 2010
Posts: 34
@Burnham
yeah , we weren't using the stax jar, so it was using the one from IBM,
the problem seems to be resolved after using
geronimo-stax-api_1.0_spec



Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: axis2 leading to JVM , outOfMemory
 
Similar Threads
Axis2, client handler not getting called
The service cannot be found for the endpoint reference (EPR) 127.0.0.1/a
Axis2/Rampart fails auth from WCF client, never calls password callback handler
Ways to consume a webservice from axis2 webservice with out creating temp files in tomcat temp folde
Web service with Eclipse + AXIS2