浏览代码

Update default connection pooling - lower to half from default values

Monte Cillo Co 8 年之前
父节点
当前提交
cf7e288f31
共有 1 个文件被更改,包括 5 次插入2 次删除
  1. 5 2
      application.yml

+ 5 - 2
application.yml

@@ -12,10 +12,13 @@ spring:
   datasource:
   datasource:
     platform : postgres
     platform : postgres
     driverClassName: com.edb.Driver
     driverClassName: com.edb.Driver
-    connectionTimeout: 10000
-    maxPoolSize: 20
     test-on-borrow: true
     test-on-borrow: true
     validation-query: SELECT 1
     validation-query: SELECT 1
+    hikari:
+      maximumPoolSize: 5 # default 10; since microservice with more than 1 instance, we set this lower
+      connectionTimeout: 10000 # 10s; default 30s
+      idleTimeout: 300000 # 5m; default 10 mins
+      maxLifetime: 900000 # 15m; default 30 mins
   redis:
   redis:
     host: redis.marathon.l4lb.thisdcos.directory
     host: redis.marathon.l4lb.thisdcos.directory
   rabbitmq:
   rabbitmq: