由于哪个应用程序服务器出现故障而需要重新启动,因此Web逻辑中的连接会增加。
这是由于线程等待响应而发生的,最近添加了一个修复程序来设置connectionTimeout
和readTimeout
值来处理超时。但修复程序尚未解决问题
<beans:bean id="messageSender" class="org.springframework.ws.transport.http.HttpComponentsMessageSender">
<beans:property name="readTimeout" value= "60000"/>
<beans:property name="connectionTimeout" value= "60000"/>
</beans:bean>
我正在使用sprint-integration 3.0.8
请在线程转储中找到下面的堆栈跟踪:
org.springframework.scheduling.quartz.SchedulerFactoryBean#0_Worker-3" #62 prio=5 os_prio=0 tid=0x00007f18c353b800 nid=0x18dc waiting on condition [0x00007f18b35fa000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000006dfc36e28> (a java.util.concurrent.CountDownLatch$Sync)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:836)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedInterruptibly(AbstractQueuedSynchronizer.java:997)
at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1304)
at java.util.concurrent.CountDownLatch.await(CountDownLatch.java:231)
at org.springframework.integration.core.MessagingTemplate$TemporaryReplyChannel.receive(MessagingTemplate.java:443)
at org.springframework.integration.core.MessagingTemplate$TemporaryReplyChannel.receive(MessagingTemplate.java:436)
at org.springframework.integration.core.MessagingTemplate.doReceive(MessagingTemplate.java:343)
at org.springframework.integration.core.MessagingTemplate.doSendAndReceive(MessagingTemplate.java:367)
at org.springframework.integration.core.MessagingTemplate.sendAndReceive(MessagingTemplate.java:274)
at org.springframework.integration.core.MessagingTemplate.convertSendAndReceive(MessagingTemplate.java:315)
at org.springframework.integration.gateway.MessagingGatewaySupport.doSendAndReceive(MessagingGatewaySupport.java:225)
at org.springframework.integration.gateway.MessagingGatewaySupport.sendAndReceive(MessagingGatewaySupport.java:204)
at org.springframework.integration.gateway.GatewayProxyFactoryBean.invokeGatewayMethod(GatewayProxyFactoryBean.java:323)
at org.springframework.integration.gateway.GatewayProxyFactoryBean.doInvoke(GatewayProxyFactoryBean.java:286)
at org.springframework.integration.gateway.GatewayProxyFactoryBean.invoke(GatewayProxyFactoryBean.java:277)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
答案 0 :(得分:0)
看到堆栈跟踪如下:
at org.springframework.integration.gateway.MessagingGatewaySupport.sendAndReceive(MessagingGatewaySupport.java:204)
at org.springframework.integration.gateway.GatewayProxyFactoryBean.invokeGatewayMethod(GatewayProxyFactoryBean.java:323)
当有人在没有回复的情况下调用流,但是等待从网关方法返回时,给出了一个典型错误的线索。
默认情况下,网关receiveTimeout
为-1
,表示infinite wait。
如果没有保证您的流程始终返回回复,请考虑使用一些有价值的default-reply-timeout
。
超出主题。另请考虑升级到最新的Spring Integration。 3.0.x
已经不再支持了。