Reputation: 1
When performing query operations on the PG database, occasional socket connection timeouts may be reported. There is a firewall between the business server and the database server. Could this be the cause? Using Durid connection pool
type: com.alibaba.druid.pool.DruidDataSource driverClassName: com.highgo.jdbc.Driver url: jdbc:highgo://ip:port/data?characterEncoding=utf8&useSSL=false&connectTimeout=5&socketTimeout=100 username: password: sql-script-encoding: utf-8 initialSize: 30 minIdle: 30 maxActive: 200 # 配置获取连接等待超时的时间 maxWait: 6000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 timeBetweenEvictionRunsMillis: 60000 # 配置一个连接在池中最小生存的时间,单位是毫秒 minEvictableIdleTimeMillis: 180000 validationQuery: select version() testWhileIdle: false testOnBorrow: true testOnReturn: false
Upvotes: 0
Views: 24