'Connection Leak'에 해당되는 글 2

  1. 2009.12.27 Closing dangling connections
  2. 2009.08.14 시스템 Hangup 현상 분석

Closing dangling connections

[09/07/08 15:48:19.212] Closing dangling connections.  All connections must have a close() in a finally block.
[09/07/08 15:48:19.212] java.lang.IllegalStateException: unclosed connection: UserPoolItem[jdbc/erpDS2,2490] was allocated at
[09/07/08 15:48:19.212]  at com.caucho.jca.UserPoolItem.<init>(UserPoolItem.java:112)
[09/07/08 15:48:19.212]  at com.caucho.jca.UserPoolItem.<init>(UserPoolItem.java:118)
[09/07/08 15:48:19.212]  at com.caucho.jca.PoolItem.toActive(PoolItem.java:256)
[09/07/08 15:48:19.212]  at com.caucho.jca.ConnectionPool.create(ConnectionPool.java:791)
[09/07/08 15:48:19.212]  at com.caucho.jca.ConnectionPool.allocatePool(ConnectionPool.java:649)
[09/07/08 15:48:19.212]  at com.caucho.jca.ConnectionPool.allocate(ConnectionPool.java:608)
[09/07/08 15:48:19.212]  at com.caucho.jca.ConnectionPool.allocateConnection(ConnectionPool.java:505)
[09/07/08 15:48:19.212]  at com.caucho.sql.DataSourceImpl.getConnection(DataSourceImpl.java:65)
[09/07/08 15:48:19.212]  at com.caucho.sql.DBPool.getConnection(DBPool.java:624)
[09/07/08 15:48:19.212]  at xxx.prm.fw.common.DBConnectionManager.getERPConnection2(DBConnectionManager.java:118)
[09/07/08 15:48:19.212]  at xxx.prm.sm.model.SMConfirmDAO.open(SMConfirmDAO.java:29)
[09/07/08 15:48:19.212]  at xxx.prm.sm.model.SMDAO.masterUpdate(SMDAO.java:1151)
...
[09/07/08 15:48:19.212]  at com.caucho.util.ThreadPool.run(ThreadPool.java:442)
[09/07/08 15:48:19.212]  at java.lang.Thread.run(Thread.java:595)

시스템 Hangup 현상 분석

Z건설사 시스템이 페이지가 열리지 않는 경우가 발생함.

[todo] 스레드덤프를 남겼지만 분석을 하지 못함.

어디에서 발생하는 에러인지 원인이 WAS인지 DB인지 파악도 안됨.

DBCP 설정에서 removeAbandoned, logAbandoned를 true로 두고 모니터링을 함.

예외처리도 정확하게 되었지만 Connection이 닫히지 않아 누수가 되고 있다.

[todo] 스레드덤프받아서 분석해보자.