[英]Java Socket Timeout Exception with Tomcat 7 and Axis 2
We have a Tomcat 7 and Axis 2 for our Java SOAP web service. 我们的Java SOAP Web服务有一个Tomcat 7和Axis 2。 We also use C3PO connection pooling (also in other web services which works fine).
我们还使用C3PO连接池(也可以在其他正常工作的Web服务中使用)。 The web service works for about two days and after that time period it is not working anymore.
Web服务工作大约两天,在那段时间后它不再工作了。 Then our consuming customer receives a Java Socket Read Timeout Exception.
然后,我们的消费客户收到Java Socket Read Timeout Exception。 After restarting the Tomcat servlet everything works fine again.
重新启动Tomcat servlet后,一切正常。 Processing the request has a duration of about 3 seconds.
处理请求的持续时间约为3秒。 The Axis 2 has a default socket timeout of 30 seconds.
Axis 2的默认套接字超时为30秒。 Our customer has a wait timeout of 60 seconds.
我们的客户等待超时为60秒。 The strange thing about the problem is that it´s working for amount of time and then the problem occurs.
关于这个问题的奇怪之处在于它在一段时间内工作然后问题就出现了。
I don´t know which kind of code I can show here to find the problem. 我不知道我可以在这里找到哪种代码来找到问题。 What causes the socket timeout here?
什么原因导致套接字超时?
Socket timeouts can occur when attempting to connect to a remote server, or during communication, especially long-lived ones. 尝试连接到远程服务器或通信期间,特别是长期服务器时,可能会发生套接字超时。
They can be caused by any connectivity problem on the network, such as: 它们可能是由网络上的任何连接问题引起的,例如:
Comparing this exception to the ConnectionRefused error, the latter indicates there is a server at the far end, but no program running on it can receive inbound connections on the chosen port. 将此异常与ConnectionRefused错误进行比较,后者表示远端有一台服务器,但没有运行的程序可以在所选端口上接收入站连接。 A Socket Timeout usually means that there is something there, but it or the network are not working right
套接字超时通常意味着存在某些内容,但它或网络无法正常工作
The root cause of a Socket Timeout is a connectivity failure between the machines, so try the usual process 套接字超时的根本原因是机器之间的连接失败,因此请尝试通常的过程
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.