2

Here hikari conf:

jdbcUrl=jdbc:postgresql://some_ip/myProject
driverClassName=org.postgresql.Driver
username=username
password=pass
connectionTestQuery=SELECT CURRENT_TIMESTAMP
maximumPoolSize=3
connectionTimeout=20000

In my Kotlin project:

   lateinit var ds: HikariDataSource
   val dbConfig = HikariConfig("hikari.conf")
    ds = HikariDataSource(dbConfig)

     if (!insertQuery.isEmpty()) {
                    val connection = ds.connection
                    val insert = connection.prepareCall(insertQuery)
                    insert.execute()
                    insert.close()
                    connection.close()
                }

And it's work fine. Nice.

But sometime I get warning message in log like this:

2019-04-27 18:55:23,852 17519559 [HikariPool-1 housekeeper] WARN  com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Thread starvation or clock leap detected (housekeeper delta=5m30s164ms615µs200ns).
2019-04-27 18:55:23,853 17519560 [HikariPool-1 housekeeper] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Pool stats (total=3, active=0, idle=3, waiting=0)
2019-04-27 18:55:53,857 17549564 [HikariPool-1 housekeeper] DEBUG com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Pool stats (total=3, active=0, idle=3, waiting=0)

As result it stop insert new records to db.

Alex
  • 1,857
  • 4
  • 17
  • 34
  • 1
    Possible duplicate? https://stackoverflow.com/questions/38703876/log-warning-thread-starvation-or-clock-leap-detected-housekeeper-delta-springh – BugOrFeature May 11 '19 at 10:36

1 Answers1

4

If you are running on a mac and see this issue it's nothing to worry about and your laptop has gone to sleep.

S--
  • 368
  • 1
  • 12