making 11 connections and the number of simultaneous builds has been throttled to 10

报错:

### The error occurred while executing a query
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: We are already in the process of making 11 connections and the number of simultaneous builds has been throttled to 10
        at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
        at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:364)
        at com.sun.proxy.$Proxy23.selectList(Unknown Source)
        at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:194)
        at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:114)
        at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:58)
        at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:43)
        at com.sun.proxy.$Proxy28.selectByExample(Unknown Source)
        at cn.com.ultrapower.cooperation.province.service.imp.TonglinkClientServiceImp.batchSendMsgAndData(TonglinkCli

解决方法:

在sping配置文件上加上    <property name="simultaneousBuildThrottle" value="20" />,不加时默认是10

 <bean id="dataSource" class="org.logicalcobwebs.proxool.ProxoolDataSource">
  <property name="driver" value="oracle.jdbc.driver.OracleDriver" />
  <property name="driverUrl" value="jdbc:oracle:thin:@192.168.101.230:1521:ultra" />
  <property name="user" value="bps" />
  <property name="password" value="bps" />
  <property name="alias" value="DSDBPool" />
  <property name="houseKeepingTestSql" value="select 1" />
  <property name="maximumConnectionCount" value="100" />
  <property name="minimumConnectionCount" value="10" />
  <property name="delegateProperties" value="characterEncoding=UTF-8" />
  <property name="maximumActiveTime" value="300000000" />
  <property name="simultaneousBuildThrottle" value="20" />
 </bean>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值