mysql连接池maxPoolSize设置1,却能打开3个连接
cookqq ›博客列表 ›mysql

mysql连接池maxPoolSize设置1,却能打开3个连接

2016-07-12 19:51:40.0|分类: mysql|浏览量: 2717

摘要: mysql连接池maxPoolSize设置1,却能打开3个连接,为什么??

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大。


一键分享文章

分类列表

  • • struts源码分析
  • • flink
  • • struts
  • • redis
  • • kafka
  • • ubuntu
  • • zookeeper
  • • hadoop
  • • activiti
  • • linux
  • • 成长
  • • NIO
  • • 关键词提取
  • • mysql
  • • android studio
  • • zabbix
  • • 云计算
  • • mahout
  • • jmeter
  • • hive
  • • ActiveMQ
  • • lucene
  • • MongoDB
  • • netty
  • • flume
  • • 我遇到的问题
  • • GRUB
  • • nginx
  • • 大家好的文章
  • • android
  • • tomcat
  • • Python
  • • luke
  • • android源码编译
  • • 安全
  • • MPAndroidChart
  • • swing
  • • POI
  • • powerdesigner
  • • jquery
  • • html
  • • java
  • • eclipse
  • • shell
  • • jvm
  • • highcharts
  • • 设计模式
  • • 列式数据库
  • • spring cloud
  • • docker+node.js+zookeeper构建微服务
版权所有 cookqq 感谢访问 支持开源 京ICP备15030920号
CopyRight 2015-2018 cookqq.com All Right Reserved.