카테고리 없음

ClientAbortException:java.net.SocketException: Broken pipe

saltdoll 2010. 4. 20. 15:25
반응형
톰켓과 아파치를 사용할때, 다음과 같은 에러가 발생할때가 있다.
이유는 뭘까?

ClientAbortException:java.net.SocketException: Broken pipe

출처: http://confluence.goldpitcher.co.kr/display/GPCONF/ClientAbortException+java.net.SocketException+Broken+Pipe+with+Jira+User+management+on+MySQL

트러블슈팅

  1. Checked that the ?autoconnect=true parameter has been set for both Confluence and Jira connection URL, but the problem persists.
  2. This is not a session timeout problem, as the user should be allowed to log in after the first login for the day.
  3. Adding the Validation query parameter, to help survive closed DB connections, does not help.

원인

MySQL connections are getting terminated by MySQL before they have been released by the connection pool. Then the next time you try to get a connection from the pool, you'll get a dead connection which will give a "broken pipe" error, as in the above stack trace.

해결방법

Evict the idle session before MySQL does. Retrying the connection, will simply create a new connection. The following parameters can be added to the Jira datasource connection URL in Confluence's server.xml for the same:

minEvictableIdleTimeMillis=21600000 (evict after 6 hours of inactivity, given that MySQL has a default timeout of 8 hours for idle database connections after which it closes the connection)
timeBetweenEvictionRunsMillis=1800000 (run the evicter every 30 minutes)
numTestsPerEviction=-1 (check every connection)

반응형
도움이 되셨다면 하트모양의 "♡ 공감"을 눌러주시면 큰 격려가 됩니다.
(로그인하지 않으셔도 가능)