从异常信息中,可以看到是read timed out,应该是Socket在读取Post过来的参数时“后继无人”,造成读取超时。因为底层实现是java.net.Socket
,而在Socket的read过程中SO_TIMEOUT参数是设置读取超时的。所以从这方面入手,提出以下几点建议供参考:
1.启用native i/o
2.增加Socket Readers,这是一个百分比,默认是33,从1-99,增加这个参数可以提高服务端接收客户端请求的速度和能力。
3.增加执行队列。
以上参数在server- >Configuration- >tuning中可以设置。
注意:以上参数调整必须先从测试环境中以近似压力测试后有效再应用于生产环境。
> 以下是现场发回的控制台日至,烦请各位老师帮助分析原因,谢谢!
>
>#### <2007-7-5 20时05分29秒 GMT+08:00 > <Error > <HTTP > <loopback > <his_managedServer1 > <ExecuteThread: '2' for queue:
'weblogic.kernel.Default' > < <WLS Kernel > > < > <BEA-101017 > <[ServletContext(id=1681284293,name=his,context-path=/his)] Root cause
of ServletException.
>java.net.SocketTimeoutException: Read timed out
> at java.net.SocketInputStream.socketRead0(Native Method)
> at java.net.SocketInputStream.read(SocketInputStream.java(Compiled Code))
> at weblogic.servlet.internal.PostInputStream.read(PostInputStream.java(Compiled Code))
> at weblogic.servlet.internal.ServletInputStreamImpl.read(ServletInputStreamImpl.java(Compiled Code))
> at weblogic.servlet.internal.ServletRequestImpl.mergePostParams(ServletRequestImpl.java(Compiled Code))
> at weblogic.servlet.internal.ServletRequestImpl.parseQueryParams(ServletRequestImpl.java(Inlined Compiled Code))
> at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java(Inlined Compiled Code))
> at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java(Compiled Code))
> at com.xxxxx.ppppp.util.RequestUtil. <init >(RequestUtil.java(Inlined Compiled Code))
> at com.xxxxx.ppppp.action.EAPDispatchAction.execute(EAPDispatchAction.java(Compiled Code))
> at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java(Inlined Compiled Code))
> at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java(Compiled Code))
> at com.xxxxx.ppppp.action.EAPActionServlet.process(EAPActionServlet.java(Compiled Code))
> at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java(Compiled Code))
> at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
> at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
> at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java(Inlined Compiled Code))
> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java(Compiled Code))
> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java(Inlined Compiled Code))
> at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java(Compiled Code))
> at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java(Compiled Code))
> at weblogic.security.service.SecurityManager.runAs(SecurityManager.java(Inlined Compiled Code))
> at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java(Compiled Code))
> at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java(Compiled Code))
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java(Compiled Code))
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java(Compiled Code))
>--------------- nested within: ------------------
>weblogic.utils.NestedRuntimeException: Cannot parse POST parameters of request: '/his/DrugChargeAction.do' - with nested
exception:
>[java.net.SocketTimeoutException: Read timed out]
> at weblogic.servlet.internal.ServletRequestImpl.mergePostParams(ServletRequestImpl.java(Compiled Code))
> at weblogic.servlet.internal.ServletRequestImpl.parseQueryParams(ServletRequestImpl.java(Inlined Compiled Code))
> at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java(Inlined Compiled Code))
> at weblogic.servlet.internal.ServletRequestImpl.getParameter(ServletRequestImpl.java(Compiled Code))
> at com.xxxxx.ppppp.util.RequestUtil. <init >(RequestUtil.java(Inlined Compiled Code))
> at com.xxxxx.ppppp.action.EAPDispatchAction.execute(EAPDispatchAction.java(Compiled Code))
> at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java(Inlined Compiled Code))
> at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java(Compiled Code))
> at com.xxxxx.ppppp.action.EAPActionServlet.process(EAPActionServlet.java(Compiled Code))
> at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java(Compiled Code))
> at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
> at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
> at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java(Inlined Compiled Code))
> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java(Compiled Code))
> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java(Inlined Compiled Code))
> at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java(Compiled Code))
> at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java(Compiled Code))
> at weblogic.security.service.SecurityManager.runAs(SecurityManager.java(Inlined Compiled Code))
> at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java(Compiled Code))
> at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java(Compiled Code))
> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java(Compiled Code))
> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java(Compiled Code))