日志警告:检测到线程饥饿或时钟跳动(管家delta = springHikariConnectionPool) [英] Log warning: Thread starvation or clock leap detected (housekeeper delta=springHikariConnectionPool)

查看:2176
本文介绍了日志警告:检测到线程饥饿或时钟跳动(管家delta = springHikariConnectionPool)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用HikariCP 2.4.6,并且在Tomcat 8启动时,我收到一条警告消息:

I'm using HikariCP 2.4.6 and at Tomcat 8 startup, I get a warning message:

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 don't see any other errors or issues reading/writing from the DB. Is this something to be concerned about? I tried searching around, but no luck.

我们还将在MySQL 5上使用Hibernate 4.3.8.Final,并在Spring 4.1.0.RELEASE上使用MySQL 5.1.39连接器.我们正在努力升级到Hibernate 5,将查看它是否会消失,但不知道这是否有关系.

We're also using Hibernate 4.3.8.Final over MySQL 5 and the MySQL 5.1.39 connector with Spring 4.1.0.RELEASE. We're working to upgrade to Hibernate 5 and will see whether this goes away, but don't know whether that will matter.

推荐答案

有一个很好的

There's a good rundown of why clock leap detections might legitimately occur. To quote the external link by Brett Woolridge:

这在管家线程上运行,该线程每30秒执行一次.如果您使用的是Mac OS X,则clockSource为 System.currentTimeMillis(),clockSource是任何其他平台 System.nanoTime().理论上两者都在单调增加,但是 诸如NTP服务器之类的各种因素都会对其产生影响.大多数操作系统是 设计用于处理向后NTP时间调整,以保留 向前的时间错觉.

This runs on the housekeeper thread, which executes every 30 seconds. If you are on Mac OS X, the clockSource is System.currentTimeMillis(), any other platform the clockSource is System.nanoTime(). Both in theory are monotonically increasing, but various things can affect that such as NTP servers. Most OSes are designed to handle backward NTP time adjustments to preserve the illusion of the forward flow of time.

这段代码是说,如果时间倒退(现在<以前),或者 时间已经跳跃"了两个以上的整理时间(更多 超过60秒),那么可能会发生一些奇怪的事情.

This code is saying, if time moves backwards (now < previous), or if time has "jumped forward" more than two housekeeping periods (more than 60 seconds), then something strange is likely going on.

可能会发生一些事情:

  1. 您可能正在某个虚拟容器(VMWare,AWS等)中运行,由于某种原因,该容器的维护工作特别差 时间向前流的错觉.

  1. You could be running in a virtual container (VMWare, AWS, etc.) that for some reason is doing a particularly poor job of maintaining the illusion of the forward flow of time.

因为管家线程中发生了其他事情-特别是关闭了空闲连接-对于某些情况 原因关闭连接阻塞了管家线程的更多信息 超过两个内务处理周期(60秒).

Because other things occur in the housekeeper thread -- specifically, closing idle connections -- it is possible that for some reason closing connections is blocking the housekeeper thread for more than two housekeeping periods (60 seconds).

服务器太忙了,所有CPU都挂了,导致线程出现饥饿,这导致管家线程无法运行 超过两个内务处理期.

The server is so busy, with all CPUs pegged, that thread starvation is occurring, which is preventing the housekeeper thread from running for more than two housekeeping periods.

考虑到这些,也许您可​​以提供其他上下文.

Considering these, maybe you can provide additional context.

请注意,这是基于HikariCP 2.4.1代码的.确保你 正在运行最新的可用版本.

Note that this is based on HikariCP 2.4.1 code. Make sure you are running the most up-to-date version available.

(看起来参数也已在最新代码中的警告语句上进行了更新.)

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

这篇关于日志警告:检测到线程饥饿或时钟跳动(管家delta = springHikariConnectionPool)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆