게시판을 이용해 주셔서 감사합니다.
다음양식에 맞게 입력해주세요.
**필수입력사항**
* 고객(업체)명 : TGS
* 제품 버전 : 4
* 문의 유형(질문/요청/참조) : 질문
* 내용 : 다음과 같은 오류가 지속적으로 발생합니다.
해당 쿼리는 토드에서 조회시 3분정도 걸리는 쿼리입니다.
다음과 같은 사례는 어떻게 조치를 해야하는지 문의 드립니다.
java.lang.RuntimeException: 컴포넌트로 GauceDataSet을 출력하는 동안에 오류가 발생하였습니다.
ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error
at com.gauce.io.bin.A.bufferFilled(Unknown Source)
at com.gauce.GauceDataSet.addDataRow(Unknown Source)
at common.db.DBManager.makeGauceDataSet(DBManager.java:596)
at common.db.DBManager.makeGauceDataSet(DBManager.java:371)
at org.apache.jsp.STOCKMNG.STOCK.AgingTotal_005fView_005fProc_jsp._jspService(AgingTotal_005fView_005fProc_jsp.java:675)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.ixync.filter.IXyncFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:462)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:366)
at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:413)
at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:401)
at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:91)
at com.gauce.io.bin.A.A(Unknown Source)
at com.gauce.io.bin.A.A(Unknown Source)
at com.gauce.io.bin.A.write(Unknown Source)
at org.apache.jsp.STOCKMNG.STOCK.AgingTotal_005fView_005fProc_jsp._jspService(AgingTotal_005fView_005fProc_jsp.java:1004)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.ixync.filter.IXyncFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.net.SocketException: Connection reset by peer: socket write error
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:215)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:462)
at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:366)
at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:240)
at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:117)
at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:192)
at org.apache.coyote.Response.doWrite(Response.java:505)
at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:383)
... 34 more
|
Connection reset by peer: socket write error
Socket으로 write() operation을 수행할 때, N/W level에서의 IO 에러가 발생한 경우입니다.
PC <---> WebServer <---> WAS <----> Database
(1) (2) (3)
구간(1)을 거친 구간(2)에서 발생했을 가능성이 가장 높습니다. 이같은 상황은, 응답이 느린 응용어플리케이션이나
혹은 '동시단말사용자수'가 증가하여 시스템의 '임계성능'에 도달하여 전체적으로 응답속도가 느려질 경우,
사용자는 응답이 미처 오기전에 'Stop/Forward/Backward' 버튼을 누르거나 혹은 다른 사이트로 이동해 버릴 수 있습니다.
일단 요청이 '접수'되어 일정한 오랜 시간동안 동작된 해당 처리의 결과를 사용자PC에게 HTTP result를 보내려고 하나 이미 사라져 버린 사용자PC 측의
Socket peer가 사라졌으로(close) Socket write IO errer를 발생하는 것입니다.
따라서, 해당 메세지가 빈번하지 않을 경우는 무시하시면 되고, 반면, 사용자 증가에 따라 부하가 극심한 시점에 위와 같은 메세지가 동시다발적으로 발생하고 있다면,
메세지가 뿌려지는 것은 어찌보면 당연한 것이며, 응용어플리케이션 혹은 해당 시스템의 임계성능'을 끌어올리는 성능개선작업을 하셔야 할 것입니다.
우선 WebServer 또는 WAS 환경의 Timeout 설정을 충분히 늘려 주는 것입니다. 가장 간단하면서 강력한 효과를 발휘할 수 있습니다. 그렇지만 해당 설정을 변경하고자
할 때 충분한 시간적 요구 사항을 파악하여 적절한 값을 도출해 주어야 합니다.
감사합니다.