1

异常

Could not get JDBC Connection; nested exception is org.apache.tomcat.jdbc.pool.PoolExhaustedException: [XNIO-2 task-6] Timeout: Pool empty. Unable to fetch a connection in 30 seconds, none available[size:100; busy:100; idle:0; lastwait:30000

修改配置

spring:
  datasource:
    url: "jdbc:mysql://localhost:3306/spring_ddd"
    driverClassName: com.mysql.jdbc.Driver
    username: "root"
    password: ""
    # Number of ms to wait before throwing an exception if no connection is available.
    tomcat:
      max-wait: 10000
    # Maximum number of active connections that can be allocated from this pool at the same time.
      max-active: 200
      validation-query: "SELECT 1"
      test-on-borrow: true
      initial-size: 1      

doc


想获取最新内容,请关注微信公众号

图片描述


codecraft
11.9k 声望2k 粉丝

当一个代码的工匠回首往事时,不因虚度年华而悔恨,也不因碌碌无为而羞愧,这样,当他老的时候,可以很自豪告诉世人,我曾经将代码注入生命去打造互联网的浪潮之巅,那是个很疯狂的时代,我在一波波的浪潮上留下...


引用和评论

0 条评论