Log warning: starvation or clock detection detected (housewife delta = springHikariConnectionPool)

I am using HikariCP 2.4.6 and a warning message appears when starting Tomcat 8:

01-Aug-2016 11:18:01.599 INFO [RMI TCP Connection(4)-127.0.0.1] org.apache.catalina.core.ApplicationContext.log Initializing Spring FrameworkServlet 'Spring MVC Dispatcher Servlet' [2016-08-01 11:18:01,654] Artifact blueberry:war exploded: Artifact is deployed successfully [2016-08-01 11:18:01,655] Artifact blueberry:war exploded: Deploy took 33,985 milliseconds Aug 01 2016 11:26:52.802 AM [DEV] (HikariPool.java:614) WARN : com.zaxxer.hikari.pool.HikariPool - 9m13s102ms - Thread starvation or clock leap detected (housekeeper delta=springHikariConnectionPool). 

I do not see any other errors or problems with reading / writing from the database. Is this something bothering you? I tried searching, but no luck.

We also use Hibernate 4.3.8.Final over MySQL 5 and the MySQL 5.1.39 connector with Spring 4.1.0.RELEASE. We are working on upgrading to Hibernate 5 and will see if it succeeds, but I don’t know if it will matter.

+20
hikaricp
source share
2 answers

There is a good summary of why the detection of a clock jump can occur legally. To quote Brett Woolridge's external link:

This is done in the housewife thread, which runs every 30 seconds. If you are running Mac OS X, clockSource System.currentTimeMillis (), any other platform to which clockSource System.nanoTime () belongs. Both in theory grow monotonously, but different things, such as NTP servers, can influence this. Most operating systems are designed to handle reverse NTP time settings to preserve the illusion of a direct stream of time.

This code says if time is moving backward (now & lt; previous), or if time has “jumped ahead” for more than two business periods (more than 60 seconds), then something is most likely strange.

A couple of things can happen:

  1. You can work in a virtual container (VMWare, AWS, etc.), which for some reason is poorly served by the illusion of a direct flow of time.

  2. Since other things happen in the housewife flow — in particular, shutting down idle connections — it is possible that for some, the reason for closing the connection is to block the housewife flow for more than two cleaning periods (60 seconds).

  3. The server is so busy, all processors are connected that the stream is depleted, which prevents the housewife from starting the stream for more than two cleaning periods.

Given this, perhaps you can provide additional context.

UPDATE: Please note that this is based on the HikariCP 2.4.1 code. Make sure you are running the latest version.

(It also looks like the parameters were updated in a warning in the latest code.)

+20
source share

Possible reasons: when you debug the application, and the thread expects a breakpoint for more than 60 seconds.

0
source share

All Articles