Tapestry3.0中頁(yè)面重復(fù)刷新或前一次提交沒(méi)有完成進(jìn)行第二次提交的時(shí)候會(huì)出現(xiàn)如下警告:
2006-12-14 14:12:31 org.apache.tapestry.engine.AbstractEngine reportException
警告: Exception during post-request cleanup.
ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error
at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:332)
at org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:298)
at org.apache.coyote.tomcat5.CoyoteOutputStream.flush(CoyoteOutputStream.java:85)
at org.apache.tapestry.request.ResponseOutputStream.forceFlush(ResponseOutputStream.java:149)
at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:945)
at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:198)
at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:159)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:534)
**********************************************************
Exception during post-request cleanup.
Session id: 94E8EF7AE0734BAFF77E89264964CFC3
Client address: 127.0.0.1
Exceptions:
org.apache.catalina.connector.ClientAbortException
java.net.SocketException: Connection reset by peer: socket write error
java.net.SocketOutputStream.socketWrite0(Native Method)
java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
java.net.SocketOutputStream.write(SocketOutputStream.java:136)
org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:714)
org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:398)
org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:304)
org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:921)
org.apache.coyote.Response.action(Response.java:182)
org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:327)
org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:298)
org.apache.coyote.tomcat5.CoyoteOutputStream.flush(CoyoteOutputStream.java:85)
org.apache.tapestry.request.ResponseOutputStream.forceFlush(ResponseOutputStream.java:149)
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:945)
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:198)
org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:159)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:534)
由于異常處理占用了部分內(nèi)存,在大的訪問(wèn)量的時(shí)候會(huì)出現(xiàn)整個(gè)網(wǎng)站性能底下甚至?xí)斐蒵vm的內(nèi)存溢出。 解決辦法:
I saw that error a lot in my existing 3.0 application. In my case I eventually tracked it down to a low level socket write error (my server was reporting that the browser shut the socket before it finished sending the full stream). I‘m sure there‘s another underlying cause e.g. the browser didn‘t do that on a whim, but I couldn‘t figure out how to fix it.
I ended up having to superclass BaseEngine and turn the error message into a noop just to keep my log from filling up with that particular error message.
If you want to get rid of it, superclass BaseEngine, and override reportError like this.
public void reportException(String reportTitle, Throwable ex) { String name = ex.getClass().getCanonicalName(); //ex.getClass().getName(); if (name.endsWith("ClientAbortException")) { Log.debug("Threw one of those annoying IE only flush errors"); return; } super.reportException(reportTitle,ex); }
|