You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ax...@ws.apache.org on 2004/09/30 14:36:35 UTC

[jira] Commented: (AXIS-1391) severe memory leakage in server side service (with tomcat)

The following comment has been added to this issue:

     Author: Venkat Reddy
    Created: Thu, 30 Sep 2004 5:36 AM
       Body:
hi Alek,

Have you tried running this benchmark on Windows XP? I tried and ran into sockect connection limit while inside the for loop, after about 4000 iterations (see stacktrace at the end).

This seems to be a problem with WinXP according to http://forum.java.sun.com/thread.jsp?thread=529837&forum=11&message=2549097

Your test case seems to create huge number of socket connections to server - is this required to reproduce the issue?
Can you post a test case that can reproduce the issue on Windows XP?

------ exception stacktrace ---------
Exception in thread "main" HTTP related exception: could not open connection to localhost:8080; nested exception is:
        Address already in use: connect; nested exception is:
java.net.BindException: Address already in use: connect
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
        at java.net.Socket.connect(Socket.java:507)
        at xsul.http_client.plain_impl.PlainClientSocketFactory.connect(PlainClientSocketFactory.java:48)
        at xsul.http_client.HttpClientConnectionManager.connect(HttpClientConnectionManager.java:58)
        at xsul.http_client.HttpClientReuseLastConnectionManager.connect(HttpClientReuseLastConnectionManager.java:97)
        at xsul.invoker.http.HttpDynamicInfosetInvoker.invokeXml(HttpDynamicInfosetInvoker.java:190)
        at xsul.invoker.soap_over_http.SoapHttpDynamicInfosetInvoker.invokeMessage(SoapHttpDynamicInfosetInvoker.java:12
2)
        at xsul.soaprpc_client.SoapRpcInvocationHandler.invokeRemoteEndpoint(SoapRpcInvocationHandler.java:170)
        at xsul.soaprpc_client.SoapRpcInvocationHandler.invoke(SoapRpcInvocationHandler.java:101)
        at $Proxy0.echoVoid(Unknown Source)
        at soap_bench.BenchClient.runOneTest(BenchClient.java:293)
        at soap_bench.BenchClient.runTestsForDirection(BenchClient.java:146)
        at soap_bench.BenchClient.runTestsForSize(BenchClient.java:125)
        at soap_bench.BenchClient.main(BenchClient.java:92)



---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1391?page=comments#action_53544

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1391

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1391
    Summary: severe memory leakage in server side service (with tomcat)
       Type: Bug

     Status: Open
   Priority: Major

    Project: Axis
 Components: 
             Basic Architecture
   Versions:
             current (nightly)

   Assignee: Davanum Srinivas
   Reporter: Aleksander Slominski

    Created: Mon, 14 Jun 2004 11:49 AM
    Updated: Thu, 30 Sep 2004 5:36 AM
Environment: Linux 2.4.24 debian (woody mostly)
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)


Description:
if you observe test progress on server machine using top you will notice that about every 10-20 seconds in-memory size of tomcat increases by 1MB ... probably the same would be happening on windows or any other OS because of WORA ...

steps to reproduce

deploy test service (Benchmark1) available from
http://www.extreme.indiana.edu/~aslom/bnp/wsperf/

start tomcat with lot of memeory (to avoid too quick out of memory error):

setenv JAVA_OPTS -Xmx1024m
./catalina.sh start

run benchmark driver:

opt/j2sdk/bin/java -Dmachine.name=LINUX_JDK142 -Dserver.name=AXIS_1_2
soap_bench.BenchClient http://server:8080/axis/services/Benchmark1
200000 aa 10,100,1000,5000,10000,25000,50000,75000,100000

observe memory usage of tomcat process (on linux use top)


if memeory -Xmx is not increased you should get after some time (depending on default -Xmx) this java.lang.OutOfMemoryError:

> >> java -Dmachine.name=LINUX_JDK142
> >> -Dserver.name=AXIS_1_2 soap_bench.BenchClient
> >> http://server:8080/axis/services/Benchmark1 200000 ev
> >> 10,100,1000,5000,10000,25000,50000,75000,100000
> >> size=10
> >> invoking 20000 times for test v arraysSize=10
...
> >> Exception in thread "main"
> >> xsul.invoker.DynamicInfosetInvokerException: HTTP server error 500
> >> Internal Server E
> >> rror body="
> >> <html><head><title>Apache Tomcat/4.1.30 - Error
> >> report</title><STYLE><!--H1{font-family : sans-serif,Arial,Taho
> >> ma;color : white;background-color : #0086b2;} H3{font-family :
> >> sans-serif,Arial,Tahoma;color : white;background
> >> -color : #0086b2;} BODY{font-family : sans-serif,Arial,Tahoma;color :
> >> black;background-color : white;} B{color
> >> : white;background-color : #0086b2;} HR{color : #0086b2;} --></STYLE>
> >> </head><body><h1>HTTP Status 500 - </h1><
> >> HR size=\"1\" noshade><p><b>type</b> Exception
> >> report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>
> >> The server encountered an internal error () that prevented it from
> >> fulfilling this request.</u></p><p><b>except
> >> ion</b> <pre>javax.servlet.ServletException: Servlet execution threw
> >> an exception
> >>        at
> >> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
> >>
> >>        at
> >> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> >>
> >>        at
> >> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
> >>
> >>        at
> >> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.j
> >>
> >> ava:643)
> >>        at
> >> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >>
> >>        at
> >> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >>        at
> >> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> >>
> >>        at
> >> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.j
> >>
> >> ava:643)
> >>        at
> >> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >>
> >>        at
> >> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >>        at
> >> org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
> >>
> >>        at
> >> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
> >>
> >>        at
> >> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.j
> >>
> >> ava:643)
> >>        at
> >> org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
> >>
> >>        at
> >> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.j
> >>
> >> ava:641)
> >>        at
> >> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
> >>
> >>        at
> >> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.j
> >>
> >> ava:641)
> >>        at
> >> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >>
> >>        at
> >> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >>        at
> >> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
> >>
> >>        at
> >> org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.j
> >>
> >> ava:643)
> >>        at
> >> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> >>
> >>        at
> >> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> >>        at
> >> org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
> >>        at
> >> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
> >>
> >>        at
> >> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.jav
> >>
> >> a:700)
> >>        at
> >> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
> >>
> >>        at
> >> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
> >>
> >>        at java.lang.Thread.run(Thread.java:534)
> >> </pre></p><p><b>root cause</b> <pre>java.lang.OutOfMemoryError
> >> </pre></p><HR size=\"1\" noshade><h3>Apache
> >> Tomcat/4.1.30</h3></body></html>"
> >>        at
> >> xsul.invoker.http.HttpDynamicInfosetInvoker.invokeXml(HttpDynamicInfosetInvoker.java:300)
> >>
> >>        at
> >> xsul.invoker.soap_over_http.SoapHttpDynamicInfosetInvoker.invokeMessage(SoapHttpDynamicInfosetInvoke
> >>
> >> r.java:122)
> >>        at
> >> xsul.soaprpc_client.SoapRpcInvocationHandler.invokeRemoteEndpoint(SoapRpcInvocationHandler.java:170)
> >>
> >>        at
> >> xsul.soaprpc_client.SoapRpcInvocationHandler.invoke(SoapRpcInvocationHandler.java:101)
> >>
> >>        at $Proxy0.echoVoid(Unknown Source)
> >>        at soap_bench.BenchClient.runOneTest(BenchClient.java:338)
> >>        at
> >> soap_bench.BenchClient.runTestsForDirection(BenchClient.java:193)
> >>        at soap_bench.BenchClient.runTestsForSize(BenchClient.java:172)
> >>        at soap_bench.BenchClient.main(BenchClient.java:143)


---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira