JBoss EAP 8.0.X 대용량 파일 업로드/다운로드 진행 시 타임아웃 발생에 대한 조치 방법 (read_timeout, write_timeout) > WAS 자료실

본문 바로가기
사이트 내 전체검색

WAS 자료실

JBoss JBoss EAP 8.0.X 대용량 파일 업로드/다운로드 진행 시 타임아웃 발생에 대한 조치 방법 (read_timeout, …

페이지 정보

profile_image
작성자 장성욱
댓글 1건 조회 440회 작성일 25-12-11 15:46

본문

1. 환경구성

WEB (JBCS 2.4.X)

WAS (JBoss EAP 8.0.8)

동일 서버, 호스트 (AJP로 연동)

 

 

2. 진행 경과

증상

 엑셀 파일 대용량 다운로드 시 타임아웃 발생 (3분동안 지연되다가 파일이 다운로드 안됨)

조치

 ajp-listener read-timeout, write-timeout 시간 90000(90초) → 1800000(5분)으로 변경

결과

 엑셀 파일 다운로드 확인

 

 

 

3. 로그 분석

// 4) 예외 (Exception) 발생

2025-10-29 11:48:29,863 DEBUG [io.undertow.request.io] (default task-1) UT005013: An IOException occurred: java.nio.channels.ClosedChannelException
    at java.base/sun.nio.ch.SocketChannelImpl.ensureOpenAndConnected(SocketChannelImpl.java:222)
    at java.base/sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:508)
    at org.xnio.nio@3.8.12.SP2-redhat-00001//org.xnio.nio.NioSocketConduit.write(NioSocketConduit.java:162)
    at org.xnio@3.8.12.SP2-redhat-00001//org.xnio.conduits.AbstractStreamSinkConduit.write(AbstractStreamSinkConduit.java:55)
    at io.undertow.core@2.3.10.SP3-redhat-00001//io.undertow.conduits.WriteTimeoutStreamSinkConduit.write(WriteTimeoutStreamSinkConduit.java:128)
    at io.undertow.core@2.3.10.SP3-redhat-00001//io.undertow.conduits.AbstractFramedStreamSinkConduit.doWrite(AbstractFramedStreamSinkConduit.java:137)
    at io.undertow.core@2.3.10.SP3-redhat-00001//io.undertow.conduits.AbstractFramedStreamSinkConduit.flushQueuedData(AbstractFramedStreamSinkConduit.java:208)

    //  3) WEB-WAS 간의 AJP 프로토콜이 순단
    at io.undertow.core@2.3.10.SP3-redhat-00001//io.undertow.server.protocol.ajp.AjpServerResponseConduit.write(AjpServerResponseConduit.java:309)
~
// 2) 같은 방식으로 Read_Timeout 발생에 n회 발생
2025-10-29 11:49:16,442 INFO  [stdout] (PoolMonitorThread) [EzLogger][11:49:16.442][INFO]toPoolMonitorThread | DUO SIZE : 0, DEQUE CNT : 3, writeFileQueue : 0, sendFileNameQueue : 0

// 1) 90초간 파일을 읽지 못한다는 내용
2025-10-29 11:49:34,089 DEBUG [io.undertow.request.io] (default I/O-1) UT005013: An IOException occurred: org.xnio.channels.ReadTimeoutException: UT000199: Read timed out after 90091 milliseconds.
    at io.undertow.core@2.3.10.SP3-redhat-00001//io.undertow.conduits.ReadTimeoutStreamSourceConduit.checkExpired(ReadTimeoutStreamSourceConduit.java:265)
    at io.undertow.core@2.3.10.SP3-redhat-00001//io.undertow.conduits.ReadTimeoutStreamSourceConduit.read(ReadTimeoutStreamSourceConduit.java:180)
    at org.xnio@3.8.12.SP2-redhat-00001//org.xnio.channels.Channels.read(Channels.java:127)
    at io.undertow.core@2.3.10.SP3-redhat-00001//io.undertow.server.protocol.ajp.AjpReadListener.handleEvent(AjpReadListener.java:126)
    at io.undertow.core@2.3.10.SP3-redhat-00001//io.undertow.server.protocol.ajp.AjpReadListener.handleEvent(AjpReadListener.java:57)
    at org.xnio.nio@3.8.12.SP2-redhat-00001//org.xnio.nio.WorkerThread.run(WorkerThread.java:624)
~

1) 처음에 증상 확인 시 로그 내용이 출력이 되지 않아 root-logger 를 INFO → DEBUG로 수정하여 로그 내용 확인

2) 분석 결과 Undertow I/O 스레드(XNIO)가 90초 이내에 read가 진행이 되지 않아 타임아웃이 발생한 것으로 판단

 

 

4. 리소스 값 확인

@JBOSS-CLI

 

1) 리소스 값 확인

/] /subsystem=undertow/server=default-server/ajp-listener=ajp:read-resource(include-runtime=true)

{
    "outcome" => "success",
    "result" => {
~
        "read-timeout" => 90000,       // 기본값 90000 millseconds (90초)
~
        "write-timeout" => 90000       // 기본값 90000 millseconds (90초)
    }
}

1) 기본값이 90초로 설정이 되어있는 것을 확인

2) JBCS 2.4.X 의 AJP 설정 확인 중 connection_pool_timeout, reply_timeout 값이 300000 millseconds (600초) 로 확인하여 해당 값으로 조정

 

 

 

5. 리소스 값 수정

@JBOSS-CLI 

 

1) read_timeout 90000 → 300000

/] /subsystem=undertow/server=default-server/ajp-listener=ajp:write-attribute(name=read-timeout,value=300000)
{
    "outcome" => "success",
    "response-headers" => {
        "operation-requires-reload" => true,
        "process-state" => "reload-required"
    }
}

 

1) write_timeout 90000 → 300000

/] /subsystem=undertow/server=default-server/ajp-listener=ajp:write-attribute(name=write-timeout,value=300000)
{
    "outcome" => "success",
    "response-headers" => {
        "operation-requires-reload" => true,
        "process-state" => "reload-required"
    }
}

 

/] reload

@standalone-ha.xml

 

~

             <buffer-cache name="default"/>           

                <ajp-listener name="ajp" read-timeout="300000" write-timeout="300000" socket-binding="ajp" max-buffered-request-size="65536"/>

                <http-listener name="default" read-timeout="300000" socket-binding="http" max-buffered-request-size="65536" redirect-socket="https" enable-http2="true"/>

                <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>

               

                    <location name="/" handler="welcome-content"/>

~


1) AJP 의 타임아웃 값과 동일하게 적용

2) read_timeout, write_timeout 동시에 같은 값을 적용한 이유는 레드햇 공식 문서 조치 가이드를 보고 동일하게 조치

3) 조치 결과 3분이내로 대용량 파일 정상 다운로드

 

[URL]] Undertow listener read/write timeout configuration in JBoss EAP 8

  

댓글목록

profile_image

BlockChainM님의 댓글

BlockChainM 작성일

좋은 정보 감사합니다.

회원로그인

회원가입

사이트 정보

회사명 : (주)리눅스데이타시스템
대표이사 : 정정모
본사 : 강남구 봉은사로 114길 40 홍선빌딩 2층
- tel : 02-6207-1160
대전지사 : 유성구 노은로174 도원프라자 5층
- tel : 042-331-1161

접속자집계

오늘
2,332
어제
2,585
최대
8,445
전체
2,034,542
Copyright © www.linuxdata.org All rights reserved.