参数读取一个关于java.net.Socket的超时的问题

废话就不多说了,开始。。。

    tyle="margin:20px 0px 0px; font-size:14px; line-height:26px; font-family:Arial; color:rgb(54,46,43)">

    从异常息信中,可以看到是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)) 

文章结束给大家分享下程序员的一些笑话语录: 手机终究会变成PC,所以ip会比wm更加畅销,但是有一天手机强大到一定程度了就会发现只有wm的支持才能完美享受。就好比树和草,草长得再高也是草,时间到了条件成熟了树就会窜天高了。www.ishuo.cn

posted @ 2013-04-26 19:07  xinyuyuanm  阅读(789)  评论(0编辑  收藏  举报