You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Ramanathan, Subramanyam" <sr...@c-cor.com> on 2006/05/25 13:51:18 UTC

Axis2 High memory usage, OutOfMemory exception

Hi, 

I have been trying out Axis 2.0 over the past week, with the configuration :
Axis2 version 1.0
Tomcat 5.5.17
jdk 1.5.0_04

I have tried using the sample "Axis2SampleDocLitService" that has been given. I generated the stubs and skeletons using the wsdl provided with the axis2 distribution (samples/wsdl/Axis2SampleDocLit.wsdl) ,  as shown in the user guide, using the xmlbeans option for data binding.

I have a http client which I use to post the xml request to the server, and I got proper responses when I tested it with the client.

However, I have noticed that when I pump requests at a rapid rate, the memory usage keeps on increasing rapidly (checked using jmx console), in some cases ultimately leading to a jvm crash with an OutOfMemory Exception.  This was occurring when default mx(which is 64M) was used.

I also tried setting the JVM mx option to 128M (-Xmx128M)  and ran the test again. However, the memory usage keeps increasing all the way till it reaches 128 Mb, too, where it again crashes if I continue pumping further. 
If I stop pumping requests at around that time, and wait for around half an hour, I notice that the memory usage begins to reduce, and slowly come back to the original value (10M approx.)  upon forcing a GC. 

I have also deployed axis1 on the same tomcat installation, with the intention of comparing performance. When I try the same test there, ie, pumping requests, I don't find any alarming memory increase.

Why is so much memory being used, and why does it grow to fill however much memory is available ? Is it a memory leak, or is there any way I can limit the amount of memory being used ? The memory usage does come down, but it takes a very long time for this. This would surely affect the performance of any webservice I try to deploy with axis2, and it may even result in the service being unavailable because of a crash.

Could you please help me out ?

Regards, 
Subramanyam

Re: Axis2 High memory usage, OutOfMemory exception

Posted by Kinichiro Inoguchi <in...@yahoo.com>.
> If I stop pumping requests at around that time, 
> and wait for around half an hour, 
> I notice that the memory usage begins to reduce, 
> and slowly come back to the original value (10M approx.)

What value is set to session-timeout in your web.xml ?
Deafault will be 30 min.
<session-config>
    <session-timeout>30</session-timeout>
</session-config>

I'm not sure but it seems after keeping session, 
memory usage begins to reduce.

Regards,
kinichiro

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Axis2 High memory usage, OutOfMemory exception

Posted by Davanum Srinivas <da...@gmail.com>.
Could you please log a jira bug and upload your test code both on the
server and client. Am really surprised. I have been testing
performance for months now and i haven't seen this behavior.

thanks,
dims

On 5/25/06, Ramanathan, Subramanyam <sr...@c-cor.com> wrote:
>
>
>
> Hi,
>
> I have been trying out Axis 2.0 over the past week, with the configuration :
> Axis2 version 1.0
> Tomcat 5.5.17
> jdk 1.5.0_04
>
> I have tried using the sample "Axis2SampleDocLitService" that has been
> given. I generated the stubs and skeletons using the wsdl provided with the
> axis2 distribution (samples/wsdl/Axis2SampleDocLit.wsdl) ,
> as shown in the user guide, using the xmlbeans option for data binding.
>
> I have a http client which I use to post the xml request to the server, and
> I got proper responses when I tested it with the client.
>
> However, I have noticed that when I pump requests at a rapid rate, the
> memory usage keeps on increasing rapidly (checked using jmx console), in
> some cases ultimately leading to a jvm crash with an OutOfMemory Exception.
> This was occurring when default mx(which is 64M) was used.
>
> I also tried setting the JVM mx option to 128M (-Xmx128M)  and ran the test
> again. However, the memory usage keeps increasing all the way till it
> reaches 128 Mb, too, where it again crashes if I continue pumping further.
>
> If I stop pumping requests at around that time, and wait for around half an
> hour, I notice that the memory usage begins to reduce, and slowly come back
> to the original value (10M approx.)  upon forcing a GC.
>
> I have also deployed axis1 on the same tomcat installation, with the
> intention of comparing performance. When I try the same test there, ie,
> pumping requests, I don't find any alarming memory increase.
>
> Why is so much memory being used, and why does it grow to fill however much
> memory is available ? Is it a memory leak, or is there any way I can limit
> the amount of memory being used ? The memory usage does come down, but it
> takes a very long time for this. This would surely affect the performance of
> any webservice I try to deploy with axis2, and it may even result in the
> service being unavailable because of a crash.
>
> Could you please help me out ?
>
> Regards,
> Subramanyam


-- 
Davanum Srinivas : http://wso2.com/blogs/

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org