Skip to content

Commit e728e8a

Browse files
chore: limit retries (#1982)
Co-authored-by: DustyD <xiao_peng0202@hotmail.com>
1 parent d7e4f11 commit e728e8a

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

oracle-api/src/main/resources/application.properties

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,25 @@ spring.datasource.hikari.maximumPoolSize = 3
3030
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.OracleDialect
3131
spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults = false
3232

33+
# --- DB connection pool safety settings ---
34+
# Time to wait for connection on pool (ms)
35+
spring.datasource.hikari.connection-timeout=10000
36+
# Maximum number of connections in the pool
37+
spring.datasource.hikari.maximum-pool-size=2
38+
# Minimum number of idle connections
39+
spring.datasource.hikari.minimum-idle=1
40+
# Maximum lifetime of a connection in the pool (ms)
41+
spring.datasource.hikari.max-lifetime=300000
42+
# How long to wait before considering a connection test as failed (ms)
43+
spring.datasource.hikari.validation-timeout=5000
44+
# Whether or not to register the pool's MBean
45+
spring.datasource.hikari.register-mbeans=true
46+
# Time between connection validation runs (ms)
47+
spring.datasource.hikari.keepalive-time=60000
48+
# Whether the pool should fail fast if the DB is down
49+
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
50+
# --- end DB connection pool safety settings ---
51+
3352
# Actuator and ops
3453
management.endpoint.health.show-details = always
3554

0 commit comments

Comments
 (0)