2016-07-12 19:51:40.0|分类: mysql|浏览量: 2579
mysql连接池maxPoolSize设置1,却能打开3个连接。 为什么能多打开3个连接呢?比设置maxPoolSize的数量大? 连接DataSource基本信息打印: { plat=com.mchange.v2.c3p0.ComboPooledDataSource[ acquireIncrement->3, acquireRetryAttempts->30, acquireRetryDelay->1000, autoCommitOnClose->false, automaticTestTable->C3P0Test, breakAfterAcquireFailure->false, checkoutTimeout->20000, connectionCustomizerClassName->null, connectionTesterClassName->com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName->1hge1689h1ps2bsx1kgrhzg|305eac01, debugUnreturnedConnectionStackTraces->false, description->null, driverClass->com.mysql.jdbc.Driver, factoryClassLocation->null, forceIgnoreUnresolvedTransactions->false, identityToken->1hge1689h1ps2bsx1kgrhzg|305eac01, idleConnectionTestPeriod->21600, initialPoolSize->3, jdbcUrl->jdbc: mysql: //192.168.1.130: 3306/doeis?useUnicode=true&characterEncoding=UTF-8, maxAdministrativeTaskTime->0, maxConnectionAge->0, maxIdleTime->25200, maxIdleTimeExcessConnections->0, maxPoolSize->1, maxStatements->0, maxStatementsPerConnection->0, minPoolSize->1, numHelperThreads->3, numThreadsAwaitingCheckoutDefaultUser->0, preferredTestQuery->null, properties->{ user=******, password=****** }, propertyCycle->0, testConnectionOnCheckin->true, testConnectionOnCheckout->false, unreturnedConnectionTimeout->0, usesTraditionalReflectiveProxies->false ] } 发现参数initialPoolSize设置的3,比maxPoolSize大。 |