grails dbcp闲置连接超时问题的原因和解决之道

  |   0 评论   |   864 浏览

    grails dbcp闲置连接超时问题的原因和解决之道


    dataSource {
    configClass = GrailsAnnotationConfiguration.class
    pooled = true
    driverClassName = “com.mysql.jdbc.Driver”
    //driverClassName = “com.p6spy.engine.spy.P6SpyDriver” // use this driver to enable p6spy logging
    username = “root”
    password = ""
    dialect = “org.hibernate.dialect.MySQL5InnoDBDialect”
    properties {
    minEvictableIdleTimeMillis=1800000
    timeBetweenEvictionRunsMillis=1800000
    numTestsPerEvictionRun=3
    testOnBorrow=true
    testWhileIdle=true
    testOnReturn=true
    validationQuery=“SELECT 1”
    }
    }

    评论

    发表评论

    validate