DB connection termination problem
- 작성자
- 관리자
- 작성일자
- 2012-04-18
- 조회수
- 4,798
Q
At the beginning, the DB connection works properly, but after a certain time DB connection error occurs. (Connection timed out or connection termination)
I’m using DBCP.
A
Hello
Even though DB Pool is created, if it is not called for a specific time, the connection is terminated depending on the DBMS setting.
If you use DBCP, add below setting. The connection will be maintained.
<property name="validationQuery" value="select 1 from dual" />
<property name="testWhileIdle" value="true" />
<property name="timeBetweenEvictionRunsMillis" value="60000" /> <!—1 minute -->
Thanks
Even though DB Pool is created, if it is not called for a specific time, the connection is terminated depending on the DBMS setting.
If you use DBCP, add below setting. The connection will be maintained.
<property name="validationQuery" value="select 1 from dual" />
<property name="testWhileIdle" value="true" />
<property name="timeBetweenEvictionRunsMillis" value="60000" /> <!—1 minute -->
Thanks