瀏覽代碼

update 连接池 max-lifetime

jay 9 月之前
父節點
當前提交
a22adc316a
共有 1 個文件被更改,包括 1 次插入1 次删除
  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时间如果连接还处于空闲状态, 该连接会被回收
       min-idle: 5 # 池中维护的最小空闲连接数, 默认为 10 个
       max-pool-size: 16 # 池中最大连接数, 包括闲置和使用中的连接, 默认为 10 个
-      max-lifetime: 60000 # 如果一个连接超过了时长,且没有被使用, 连接会被回收
+      max-lifetime: 25000 # 如果一个连接超过了时长,且没有被使用, 连接会被回收
       is-auto-commit: true
     # 内置h2 web console设置
     platform: h2