1

Wir haben ein paar Spring Outbound SOAP WebServices Clients (sprechen mit externen WS). Wir sprechen mit ihnen über Spring Integration Gateway.Große ausgehende Nutzlast, die in Spring-Integration stecken bleibt

mit Versionen:

Spring Integration version - 4.0.4.RELEASE 
Spring version - 4.1.6.RELEASE 
Spring WS - 2.2.4 
Apache http client - 4.5.1 

Alle funktioniert gut, wenn die Nutzlast ein paar kbs ist. Aber wenn wir eine etwas größere Nutzlast haben (sagen wir 700KB, nicht riesig, weiß ich), bleibt die Verarbeitung hängen. Der Thread-Dump gibt den folgenden StackTrace. Dies geschieht sowohl in Weblogic (12C) als auch in Apache Tomcat, jedoch nur unter Linux.

Ist jemand schon einmal auf dieses Problem gestoßen? Gibt es eine Konfiguration in Spring Integration/Gateway, wo wir die Größe des Schreibpuffers einstellen können?

java.lang.Thread.State: RUNNABLE 
     at java.net.SocketOutputStream.socketWrite0(Native Method) 
     at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109) 
     at java.net.SocketOutputStream.write(SocketOutputStream.java:153) 
     at sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:431) 
     at sun.security.ssl.OutputRecord.write(OutputRecord.java:417) 
     at sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:864) 
     at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:835) 
     at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123) 
     - locked <0x00000000c31b1d00> (a sun.security.ssl.AppOutputStream) 
     at org.apache.http.impl.io.SessionOutputBufferImpl.streamWrite(SessionOutputBufferImpl.java:126) 
     at org.apache.http.impl.io.SessionOutputBufferImpl.write(SessionOutputBufferImpl.java:162) 
     at org.apache.http.impl.io.ContentLengthOutputStream.write(ContentLengthOutputStream.java:115) 
     at org.apache.http.entity.ByteArrayEntity.writeTo(ByteArrayEntity.java:116) 
     at org.apache.http.impl.DefaultBHttpClientConnection.sendRequestEntity(DefaultBHttpClientConnection.java:158) 
     at org.apache.http.impl.conn.CPoolProxy.sendRequestEntity(CPoolProxy.java:162) 
     at org.apache.http.protocol.HttpRequestExecutor.doSendRequest(HttpRequestExecutor.java:237) 
     at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:122) 
     at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:271) 
     at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184) 
     at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:88) 
     at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110) 
     at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184) 
     at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) 
     at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:107) 
     at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55) 
     at org.springframework.ws.transport.http.HttpComponentsConnection.onSendAfterWrite(HttpComponentsConnection.java:121) 
     at org.springframework.ws.transport.AbstractWebServiceConnection.send(AbstractWebServiceConnection.java:48) 
     at org.springframework.ws.client.core.WebServiceTemplate.sendRequest(WebServiceTemplate.java:658) 
     at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:606) 
     at org.springframework.ws.client.core.WebServiceTemplate.sendAndReceive(WebServiceTemplate.java:555) 
     at org.springframework.integration.ws.MarshallingWebServiceOutboundGateway.doHandle(MarshallingWebServiceOutboundGateway.java:81) 
     at org.springframework.integration.ws.AbstractWebServiceOutboundGateway.handleRequestMessage(AbstractWebServiceOutboundGateway.java:167) 
     at org.springframework.integration.handler.AbstractReplyProducingMessageHandler$AdvisedRequestHandler.handleRequestMessage(AbstractReplyProducingMessageHandler.java:313) 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
     at java.lang.reflect.Method.invoke(Method.java:483) 
     at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) 
     at org.springframework.integration.handler.advice.AbstractRequestHandlerAdvice$1.cloneAndExecute(AbstractRequestHandlerAdvice.java:92) 
     at org.springframework.integration.handler.advice.RequestHandlerRetryAdvice$2.doWithRetry(RequestHandlerRetryAdvice.java:88) 
     at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:263) 
     at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:193) 
     at org.springframework.integration.handler.advice.RequestHandlerRetryAdvice.doInvoke(RequestHandlerRetryAdvice.java:85) 
     at org.springframework.integration.handler.advice.AbstractRequestHandlerAdvice.invoke(AbstractRequestHandlerAdvice.java:69) 
     at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) 
     at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) 
     at com.sun.proxy.$Proxy92.handleRequestMessage(Unknown Source) 
     at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.doInvokeAdvisedRequestHandler(AbstractReplyProducingMessageHandler.java:189) 
     at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:173) 
     at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:78) 
     at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116) 
     at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:101) 
     at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:97) 
     at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77) 
     at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:255) 
     at org.springframework.integration.handler.MessageHandlerChain$ReplyForwardingMessageChannel.send(MessageHandlerChain.java:263) 

UPDATE Ich veränderte die DefaultSocketConfig des Httpclient (auf einem benutzerdefinierten eins) setSndBufSize zu einem großen auf einzubeziehen. Immer noch keine Wirkung!

Beim Ausführen von netstat -ant | grep 443 ist der TCP-Status CLOSE_WAIT (und manchmal LAST_ACK) und bleibt dort für immer hängen.

+1

'bei java.net.SocketOutputStream.socketWrite0 (Native Methode)' sieht aus wie die Puffer voll sind - Server liest nicht oder das Netzwerk ist langsam - Sie müssen einen Netzwerk-Monitor wie Wireshark ausführen . –

+0

Denke nicht, da wir eine Testanwendung haben (Spring Integration/HttpClient/selbe Versionen), die die gleiche Nutzlast ohne Probleme auf der gleichen Linux-Box sendet. – avijendr

+1

Nun, es ist eindeutig nicht im Frühling code 'at java.net.SocketOutputStream.socketWrite0 (Native Methode)' –

Antwort

1

bei java.net.SocketOutputStream.socketWrite0 (native Methode)

Es sieht für mich wie die Puffer voll sind - Server ist nicht schnell genug, um das Lesen oder das Netzwerk ist langsam - Sie müssen laufen ein Netzwerkmonitor wie wireshark