hikaricp

HikariCP - connection is not available

戏子无情 提交于 2019-11-28 16:59:13
We have Spring-boot/Hibernate/PostgreSQL application in our project and use Hikari as the connection pool. We keep running into the following problem: after few hours active connections number grows to the limit and we get the errors like this (full stack trace is at the end of the question): Caused by: java.sql.SQLTransientConnectionException: HikariPool-0 - Connection is not available, request timed out after 30000ms. at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:213) ~[HikariCP-2.4.1.jar:na] at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:163) ~

How do I configure HikariCP for postgresql?

一笑奈何 提交于 2019-11-28 09:59:49
问题 I'm trying to use HikariCP in postgresql and I can't find anywhere the configuration for postgresql. Please point me to any example for postgresql with HikariCP or any configurations tutorial for the same. I tried to use it like below but it didn't work and then I realized it was meant for MySQL public static DataSource getDataSource() { if(datasource == null) { HikariConfig config = new HikariConfig(); config.setJdbcUrl("jdbc:mysql://localhost/test"); config.setUsername("root"); config

Reset (autoCommit) on connection in HikariCP

混江龙づ霸主 提交于 2019-11-28 00:57:16
问题 I keep seeing this log when I use connections in Hikari pool. [com.zaxxer.hikari.pool.PoolElf] : HikariPool-0 - Reset (autoCommit) on connection com.mysql.jdbc.JDBC4Connection@1c9b0314 [com.zaxxer.hikari.pool.PoolElf] : HikariPool-0 - Reset (autoCommit) on connection com.mysql.jdbc.JDBC4Connection@1c9b0314 [com.zaxxer.hikari.pool.PoolElf] : HikariPool-0 - Reset (autoCommit) on connection com.mysql.jdbc.JDBC4Connection@1c9b0314 [com.zaxxer.hikari.pool.PoolElf] : HikariPool-0 - Reset

How to set correct MySQL JDBC timezone in Spring Boot configuration

。_饼干妹妹 提交于 2019-11-27 18:08:23
问题 DB: $ mysql --version mysql Ver 14.14 Distrib 5.6.27, for osx10.10 (x86_64) using EditLine wrapper Spring Boot: 2.1.1.RELEASE The error: 2019-01-01 15:56:25.849 ERROR 39957 --- [ restartedMain] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization. > :bootRun java.sql.SQLException: The server time zone value 'AEDT' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration

HikariCP: What database level timeouts should be considered to set maxLifetime for Oracle 11g

↘锁芯ラ 提交于 2019-11-27 16:12:40
In the documentation for HikariCP, it is mentioned that We strongly recommend setting this value, and it should be at least 30 seconds less than any database-level connection timeout. What are those database-level connection timeouts that should be taken into account for Oracle11.2 database? And how could I find those timeouts (queries to execute)? Short answer: none (by default). For the record (to include details here in case the link changes), we're talking about property maxLifetime of HikariCP : This property controls the maximum lifetime of a connection in the pool. An in-use connection

HikariCP - connection is not available

£可爱£侵袭症+ 提交于 2019-11-27 09:57:58
问题 We have Spring-boot/Hibernate/PostgreSQL application in our project and use Hikari as the connection pool. We keep running into the following problem: after few hours active connections number grows to the limit and we get the errors like this (full stack trace is at the end of the question): Caused by: java.sql.SQLTransientConnectionException: HikariPool-0 - Connection is not available, request timed out after 30000ms. at com.zaxxer.hikari.pool.HikariPool.getConnection(HikariPool.java:213) ~

跟我学Spring Cloud(Finchley版)-03-监控:强大的Spring Boot Actuator

一笑奈何 提交于 2019-11-27 02:23:06
第2节( 跟我学Spring Cloud(Finchley版)-02-构建分布式应用 )说过: 应用没有监控,没有画板,一切指标都没有。在这个Growth Hack逐渐成为主流的时代,不弄个Dashboard把系统压力、QPS、CPU、内存、日活啥的可视化,你好意思出来混吗…… 本节我们来解决该问题。 Spring Boot Actuator是Spring Boot官方提供的监控组件。只需为项目添加以下依赖,即可就整合Spring Boot Actuator。 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> 监控端点 Actuator为我们提供了很多监控端点,如下表所示。 端点(Spring Boot 2.x) 描述 HTTP方法 是否敏感 端点(Spring Boot 1.x) conditions 显示自动配置的信息 GET 是 autoconfig beans 显示应用程序上下文所有的Spring bean GET 是 beans configprops 显示所有@ConfigurationProperties的配置属性列表 GET 是 configprops dump

How to set up datasource with Spring for HikariCP?

♀尐吖头ヾ 提交于 2019-11-26 21:55:55
Hi I'm trying to use HikariCP with Spring for connection pool. I'm using jdbcTempLate and JdbcdaoSupport. This is my spring configuration file for datasource: <bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource"> <property name="dataSourceClassName" value="oracle.jdbc.driver.OracleDriver"/> <property name="dataSource.url" value="jdbc:oracle:thin:@localhost:1521:XE"/> <property name="dataSource.user" value="username"/> <property name="dataSource.password" value="password"/> </bean> But unfortunately the following error message is generating: Cannot resolve reference to bean

HikariCP: What database level timeouts should be considered to set maxLifetime for Oracle 11g

梦想与她 提交于 2019-11-26 18:34:32
问题 In the documentation for HikariCP, it is mentioned that We strongly recommend setting this value, and it should be at least 30 seconds less than any database-level connection timeout. What are those database-level connection timeouts that should be taken into account for Oracle11.2 database? And how could I find those timeouts (queries to execute)? 回答1: Short answer: none (by default). For the record (to include details here in case the link changes), we're talking about property maxLifetime

HikariCP: What database level timeouts should be considered to set maxLifetime for Oracle 11g

只愿长相守 提交于 2019-11-26 17:26:12
问题 In the documentation for HikariCP, it is mentioned that We strongly recommend setting this value, and it should be at least 30 seconds less than any database-level connection timeout. What are those database-level connection timeouts that should be taken into account for Oracle11.2 database? And how could I find those timeouts (queries to execute)? 回答1: Short answer: none (by default). For the record (to include details here in case the link changes), we're talking about property maxLifetime