나는 MySQL 데이터베이스에 연결하는 grails로 빌드 된 webservice를 가지고있다.grails로 연결 풀 상태 얻기
org.apache.tomcat.jdbc.pool.PoolExhaustedException: [http-bio-8080-exec-216] Timeout: Pool empty. Unable to fetch a connection in 30 seconds, none available[size:50; busy:50; idle:0; lastwait:30000]
를이 내 Datasources.groovy
내가 읽은dataSource {
url = "jdbc:mysql://..."
username = "xxx"
password = "xxx"
pooled = true
properties {
maxActive = 50
maxAge = 10 * 60000
timeBetweenEvictionRunsMillis = 5000
minEvictableIdleTimeMillis = 60000
numTestsPerEvictionRun=3
testOnBorrow=true
testWhileIdle=true
testOnReturn=true
validationQuery="SELECT 1"
}
}
dataSource_survey {
url = "jdbc:mysql://..."
username = "xxx"
password = "xxx"
pooled = true
properties {
maxActive = 50
maxAge = 10 * 60000
timeBetweenEvictionRunsMillis = 5000
minEvictableIdleTimeMillis = 60000
numTestsPerEvictionRun=3
testOnBorrow=true
testWhileIdle=true
testOnReturn=true
validationQuery="SELECT 1"
}
}
Grails가있다 : 내가 2.4.3로 업그레이드 이후 나는 connectionpool 예외의 결과로, 연결을 해제하지 문제를 했어 JIRA와 어떤 사람들은 비슷한 문제가있는 것 같습니다. 그러나 나는 거기에 제공된 정보로 그것을 고칠 수 없었다.
연결 풀의 상태에 액세스하면 많은 디버깅에 도움이됩니다. 연결 풀의 상태를 확인하여 런타임 중에 얼마나 많은 연결이 유휴/통화 중 상태인지 확인할 수 있습니까?
Grails Melody 플러그인을 살펴 보는 것이 좋습니다. http://grails.org/plugin/grails-melody이 정보와 그 밖의 정보가 있습니다. –
@JoshuaMoore 유용하게 보입니다. 팁 고마워. – ascu