[JEUS] Connection reset by peer 오류 해결

IT/WAS | 2012. 7. 16. 13:48
Posted by 까군

 

[현상]
* 속성조회 시 축척이 1000미만인 경우에는 문제 없었으나 2000부터는 아래와 같은 오류 발생.

ClientAbortException: java.net.SocketException: Connection reset by peer: socket write error

[원인]
"ClientAbortException: java.net.SocketException"으로 구글링 결과 아래 내용 발견

Usually, this kind of behaviour occurs when one of the following happens
1.When user make a request, and suddenly browser get closed by user accidentally or due to browser crash
2.When user make a request, and browser closes the http connection automatically due to exceeded content length size
3.When user make a request, and presses the stop button

1.번은 아니라고 하니 2.번일 가능성이 큼.

[해결방안]
1. response.setHeader("Content-Lenght",2048);
2. 제우스 설정파일 수정
WEBMain.xml
<webtob-listener>
...
<output-buffer-size>2048</output-buffer-size>  //단위는 byte
...
</webtob-listener>
output-buffer-size 값 조정

* <output-buffer-size>는 클라이언트에게 데이터를 내보낼 때 여기에 설정한 사이즈만큼 쪼개서 보내는 역할을 하는 옵션으로 "0"으로 설정할 경우 대용량 파일 다운로드와 같은 경우 OutOfMemory발생의 위험이 있음.
("0"으로 설정하면 모든 데이터를 힙메모리에 저장해둔 다음 처리 한다고함)

 

블로그 이미지

까군

카테고리

분류 전체보기 (62)
IT (21)
생활 (0)
명언 (41)