Browse Source

update 连接池 max-lifetime

jay 9 months ago
parent
commit
a22adc316a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      iot-starter/src/main/resources/application-dev.yml

+ 1 - 1
iot-starter/src/main/resources/application-dev.yml

@@ -29,7 +29,7 @@ spring:
       idle-timeout: 30000 # 经过idle-timeout时间如果连接还处于空闲状态, 该连接会被回收
       idle-timeout: 30000 # 经过idle-timeout时间如果连接还处于空闲状态, 该连接会被回收
       min-idle: 5 # 池中维护的最小空闲连接数, 默认为 10 个
       min-idle: 5 # 池中维护的最小空闲连接数, 默认为 10 个
       max-pool-size: 16 # 池中最大连接数, 包括闲置和使用中的连接, 默认为 10 个
       max-pool-size: 16 # 池中最大连接数, 包括闲置和使用中的连接, 默认为 10 个
-      max-lifetime: 60000 # 如果一个连接超过了时长,且没有被使用, 连接会被回收
+      max-lifetime: 25000 # 如果一个连接超过了时长,且没有被使用, 连接会被回收
       is-auto-commit: true
       is-auto-commit: true
     # 内置h2 web console设置
     # 内置h2 web console设置
     platform: h2
     platform: h2