Forráskód Böngészése

修改redis连接池数量

hxd 3 hónapja
szülő
commit
118d44c15d

+ 11 - 5
portal-service-server/src/main/resources/bootstrap-dev.yml

@@ -18,17 +18,23 @@ spring:
     # 数据库索引
     database: 5
     # 连接超时时间
-    timeout: 10s
+    timeout: 30s
+    #TCP连接建立超时
+    connect-timeout: 10s
     lettuce:
       pool:
         # 连接池中的最小空闲连接
-        min-idle: 0
+        min-idle: 10
         # 连接池中的最大空闲连接
-        max-idle: 8
+        max-idle: 20
         # 连接池的最大数据库连接数
-        max-active: 8
+        max-active: 50
         # #连接池最大阻塞等待时间(使用负值表示没有限制)
-        max-wait: -1ms
+        max-wait: 5000ms
+        # 连接空闲超时
+      shutdown-timeout: 100ms
+      # Redis命令执行最大耗时(含网络传输)。若超过该时间将抛出超时异常。
+      command-timeout: 30ms
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
     url: jdbc:mysql://8.130.28.21:3306/lnxx_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai

+ 3 - 3
portal-service-server/src/main/resources/bootstrap-local.yml

@@ -24,11 +24,11 @@ spring:
     lettuce:
       pool:
         # 连接池中的最小空闲连接
-        min-idle: 2
+        min-idle: 10
         # 连接池中的最大空闲连接
-        max-idle: 10
+        max-idle: 20
         # 连接池的最大数据库连接数
-        max-active: 16
+        max-active: 50
         # #连接池最大阻塞等待时间(使用负值表示没有限制)
         max-wait: 5000ms
         # 连接空闲超时

+ 11 - 5
portal-service-server/src/main/resources/bootstrap-test.yml

@@ -18,17 +18,23 @@ spring:
     # 数据库索引
     database: 5
     # 连接超时时间
-    timeout: 10s
+    timeout: 30s
+    #TCP连接建立超时
+    connect-timeout: 10s
     lettuce:
       pool:
         # 连接池中的最小空闲连接
-        min-idle: 0
+        min-idle: 10
         # 连接池中的最大空闲连接
-        max-idle: 8
+        max-idle: 20
         # 连接池的最大数据库连接数
-        max-active: 8
+        max-active: 50
         # #连接池最大阻塞等待时间(使用负值表示没有限制)
-        max-wait: -1ms
+        max-wait: 5000ms
+        # 连接空闲超时
+      shutdown-timeout: 100ms
+      # Redis命令执行最大耗时(含网络传输)。若超过该时间将抛出超时异常。
+      command-timeout: 30ms
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
     url: jdbc:mysql://8.130.28.21:3306/lnxx_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=Asia/Shanghai