[ 
http://issues.apache.org/jira/browse/AXIS2-766?page=comments#action_12413285 ] 

Andreas Hörnicke commented on AXIS2-766:
----------------------------------------

Possible solution:

Extend org.apache.axis2.transport.http.AxisServlet, override the service method 
and invalidate the session after calling super.service().

---
package own.package;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class AxisServlet extends org.apache.axis2.transport.http.AxisServlet {
    protected void service(HttpServletRequest httpServletRequest, 
HttpServletResponse httpServletResponse)
            throws ServletException, IOException {

        super.service(httpServletRequest, httpServletResponse);
        httpServletRequest.getSession().invalidate();
    }
}


> Axis2 High memory usage, OutOfMemory exception
> ----------------------------------------------
>
>          Key: AXIS2-766
>          URL: http://issues.apache.org/jira/browse/AXIS2-766
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>  Environment: Red Hat Enterprise Linux ES release 4
> Axis2 version 1.0 
> Tomcat 5.5.17 
> jdk 1.5.0_04 
>     Reporter: Subramanyam Ramanathan
>  Attachments: Axis2SampleDocLit.wsdl, Axis2SampleDocLitServiceSkeleton.java, 
> PostXmlToAxis.java, SoapSender.java, test2.xml
>
> 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 also filled in the 
> Skeleton class with the same code as given in the user guide.
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to