Axis2 - Timeout waiting for connection 问题解决方法

 文章声明

作者:傲风(aofengblog@163.com)      编写时间:2010年01月05日

网址:http://aofengblog.blog.163.com

作者保留所有权利,转载请保留文章全部内容!


环境

Solaris 10 Enterprise
Resin-3.0.x
Axis2-1.5.1

错误解决方法

今天早上收到其他项目组的求助邮件,系统在单机下400并发时经常有2~3个报错信息。他们查找了许久但找不到解决问题的办法。

完整的错误信息如下:
2009-12-18 17:37:55,140 INFO  [resin-tcp-connection-*:3080-10927] http.HTTPSender (HTTPSender.java:202) - Unable to send
org.apache.commons.httpclient.ConnectionPoolTimeoutException: Timeout waiting for connection
   at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.doGetConnection(MultiThreadedHttpConnecti
   at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.getConnectionWithTimeout(MultiThreadedHtt
   at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:153)
   at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
   at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
   at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
   at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
   at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:76)
   at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSen
   at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:225)
   at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
   at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
   at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
   at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
   at com.*.*.mail.action.LoginAction.execute(LoginAction.java:81)
   at sun.reflect.GeneratedMethodAccessor93.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:440)
   at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:279)
   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:242)
   at com.asiainfo.aiwm.mail.action.CommonInterceptor.intercept(CommonInterceptor.java:42)
   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
   at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)
   at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
   at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
   at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
   at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)
   at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
   at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilt
   at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:70)
   at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:173)
   at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
   at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:274)
   at com.caucho.server.port.TcpConnection.run(TcpConnection.java:514)
   at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:527)
   at com.caucho.util.ThreadPool.run(ThreadPool.java:449)
   at java.lang.Thread.run(Thread.java:595)


原因/解决方法:
    将 AXIS2 从1.5.1 回退到 1.5。
为了解决 CLOSE_WAIT 的问题,AXIS2 从1.4,1.5 升到 1.5.1 的时候,内部连接池的实现发生了不小的变化。同时也带来了新的问题:在高并发下会产生ConnectionPoolTimeoutException,此问题在1.5.1版本下暂时还没有解决办法。

<正文结束>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值