Posted by hlaprade
on December 10, 2007 at 4:06 PM PST
We're having problems with apparent memory leaks from axis
when running code to consume web services.
We have been monitoring the JVM with a profiling tool called YourKit and
we noticed that after running the code that queries the webservices a considerable
amount of new instances belonging to com.sun.org.apache.xerces are created and remain
there even after forcing the garbage collector, especially
At the begining we suspected that the leaks were happening because we were calling the
webservices from a static context, so we changed to instances but the problem continued.
The webservice calling is made via stubs generated with the WSDL2Java utility from axis.
Due to the nature of our application (a multi player or multi user game server) this causes us a lot of headaches because in the not so long run (about 18 to 24 hours) the memory image used by the VM grows a lot making the server crash.
Were using java 1.5 and tried different options to consume the webservices but axis is
the only one that has worked well for us. The JVM is running on a Red Hat Enterprise Linux 4 ES
with Postgres 8.1 and our software connects to different webservices provided mostly from MS .Net
We will appreciate if some of guys have any workarounds to this axis problem or if you
know some alternatives to axis that doesn't complain about .Net WSDLs when generating the stubs.
Thanks in advance.