cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-3259) CXF hangs after many transactions on one client proxy using MTOM
Date Wed, 19 Jan 2011 20:37:43 GMT

    [ https://issues.apache.org/jira/browse/CXF-3259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12983879#action_12983879
] 

Daniel Kulp commented on CXF-3259:
----------------------------------





The client isn't closing the streams.   If you do:

{code}
 DataHandler dh = d.getContentBlob("bogusDocID", "BogusBlobID");
 dh.getInputStream().close();
{code}

then it runs to completion.   Basically, the server has tried to send some data back to the
client.  In your case, the 2048 bytes likely fits into the socket buffer so from the server
sides point of view, data was sent.  However, the HTTPUrlConnection on the client side hasn't
read all the data.   Thus, the client side cannot reuse the connection and creates more connections.
  Eventually, it runs out of file handles and thread pools and such.  (example:  call "ulimit
-n 256" first.  Dies pretty fast)    Also, on the server side, the connections do look idle.
 All data was sent to the client, but no furthur requests have come in (since the client cannot
reuse the connection) so it closes them.

Basically, if you don't close streams, all hell can break lose.  :-)


> CXF hangs after many transactions on one client proxy using MTOM
> ----------------------------------------------------------------
>
>                 Key: CXF-3259
>                 URL: https://issues.apache.org/jira/browse/CXF-3259
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.3.1
>         Environment: All Linux/OSX
>            Reporter: Ian Helmke
>             Fix For: NeedMoreInfo
>
>
> CXF is hanging and timing out with a java.net.SocketTimeoutException after we attempt
a number of transactions. The exact number of transactions that go through successfully before
we get the exception varies widely; I have seen as few as 200 run successfully or as many
as several thousand. It consistently does eventually fail and throw an exception, however.
We are using MTOM.
> A git repository with sample code and a junit test case that fairly reliably reproduces
this problem can be found at: https://github.com/basis-technology-corp/cxf-connection-timeout
> The stacktrace is as follows:
> {noformat}
> org.apache.cxf.phase.PhaseInterceptorChain  - Interceptor for {http://jdd.basistech.com/}DocumentDatabaseService#{http://jdd.basistech.com/}getContentBlob
has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Could not send Message.
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:255)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:516)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:313)
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:265)
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
> 	at $Proxy25.getContentBlob(Unknown Source)
> 	at com.basistech.jdd.CallSpamClient.main(CallSpamClient.java:44)
> 	at com.basistech.test.BugExampleTest.testJDDLauncher(BugExampleTest.java:33)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
> 	at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
> 	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:35)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:146)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:97)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.maven.surefire.booter.ProviderFactory$ClassLoaderProxy.invoke(ProviderFactory.java:103)
> 	at $Proxy0.invoke(Unknown Source)
> 	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:145)
> 	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcess(SurefireStarter.java:87)
> 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:69)
> Caused by: java.net.SocketTimeoutException: SocketTimeoutException invoking http://localhost:6006/documentDatabase:
Read timed out
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:2106)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2091)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:696)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	... 39 more
> Caused by: java.net.SocketTimeoutException: Read timed out
> 	at java.net.SocketInputStream.socketRead0(Native Method)
> 	at java.net.SocketInputStream.read(SocketInputStream.java:129)
> 	at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
> 	at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
> 	at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
> 	at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
> 	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
> 	at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:652)
> 	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1200)
> 	at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2223)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2192)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2036)
> 	... 42 more
> {noformat}
> Please let me know if there is any additional information that I can provide for you
that would be helpful.
> Ian Helmke
> Basis Technology

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message