HikariCP最初关闭

时间:2019-05-28 09:47:28

标签: java sql-server hikaricp dbconnection

首先,我不是Java开发人员。但是,我有一个用Java开发的服务,并且可以按预期工作到今天。我们的数据库服务器出现磁盘错误,因此我们返回VMVare备份。
我在不同计算机上的服务未按预期运行(或似乎运行,但不运行)。
最近的Java代码是一年多以前开发的。因此,任何配置都已更改。我收到该日志并被挤压。

Java版本:1.8.0_151
Microsoft SQL Server:2012企业版

DEBUG 28/05/2019 12:26:55 [main] [] [] [] Checking 0 named HQL queries
DEBUG 28/05/2019 12:26:55 [main] [] [] [] Checking 0 named SQL queries
DEBUG 28/05/2019 12:26:55 [main] [] [] [] Initializing SessionFactoryRegistry : org.hibernate.internal.SessionFactoryRegistry@3f06ebe0
DEBUG 28/05/2019 12:26:55 [main] [] [] [] Registering SessionFactory: aa73b978-22f9-4309-b9f3-e07d951dbd50 ()
DEBUG 28/05/2019 12:26:55 [main] [] [] [] Not binding SessionFactory to JNDI, no JNDI name configured
INFO  28/05/2019 12:26:56 [main] [] [] [] BatchDML Bean afterPropertiesSet
INFO  28/05/2019 12:26:56 [main] [] [] [] HazelcastCache is initiated amr_common
INFO  28/05/2019 12:26:56 [main] [] [] [] HazelcastCache initializing in afterPropertiesSet.
DEBUG 28/05/2019 12:27:21 [springHikariCP housekeeper] [] [] [] springHikariCP - Before cleanup stats (total=5, active=0, idle=5, waiting=0)
DEBUG 28/05/2019 12:27:21 [springHikariCP housekeeper] [] [] [] springHikariCP - After cleanup stats (total=5, active=0, idle=5, waiting=0)
DEBUG 28/05/2019 12:27:51 [springHikariCP housekeeper] [] [] [] springHikariCP - Before cleanup stats (total=5, active=0, idle=5, waiting=0)
DEBUG 28/05/2019 12:27:51 [springHikariCP housekeeper] [] [] [] springHikariCP - After cleanup stats (total=5, active=0, idle=5, waiting=0)
DEBUG 28/05/2019 12:28:21 [springHikariCP housekeeper] [] [] [] springHikariCP - Before cleanup stats (total=5, active=0, idle=5, waiting=0)
DEBUG 28/05/2019 12:28:21 [springHikariCP housekeeper] [] [] [] springHikariCP - After cleanup stats (total=5, active=0, idle=5, waiting=0)
DEBUG 28/05/2019 12:28:51 [springHikariCP housekeeper] [] [] [] springHikariCP - Before cleanup stats (total=5, active=0, idle=5, waiting=0)
DEBUG 28/05/2019 12:28:51 [springHikariCP housekeeper] [] [] [] springHikariCP - After cleanup stats (total=5, active=0, idle=5, waiting=0)
DEBUG 28/05/2019 12:28:58 [main] [] [] [] HHH000031: Closing
TRACE 28/05/2019 12:28:58 [main] [] [] [] Cleaning QueryPlan Cache
TRACE 28/05/2019 12:28:58 [main] [] [] [] Registering external cascade style [persist : STYLE_PERSIST]
DEBUG 28/05/2019 12:28:58 [main] [] [] [] External cascade style regsitration [persist : STYLE_PERSIST] overrode base registration [STYLE_PERSIST_SKIPLAZY]
DEBUG 28/05/2019 12:28:58 [main] [] [] [] Implicitly destroying ServiceRegistry on de-registration of all child ServiceRegistries
DEBUG 28/05/2019 12:28:58 [main] [] [] [] Implicitly destroying Boot-strap registry on de-registration of all child ServiceRegistries
INFO  28/05/2019 12:28:58 [main] [] [] [] springHikariCP - Shutdown initiated...
DEBUG 28/05/2019 12:28:58 [main] [] [] [] springHikariCP - Before shutdown stats (total=5, active=0, idle=5, waiting=0)
DEBUG 28/05/2019 12:28:58 [springHikariCP connection closer] [] [] [] springHikariCP - Closing connection net.sourceforge.jtds.jdbc.ConnectionJDBC3@4a1c0752: (connection evicted)
DEBUG 28/05/2019 12:28:58 [springHikariCP connection closer] [] [] [] springHikariCP - Closing connection net.sourceforge.jtds.jdbc.ConnectionJDBC3@6c2336cd: (connection evicted)
DEBUG 28/05/2019 12:28:58 [springHikariCP connection closer] [] [] [] springHikariCP - Closing connection net.sourceforge.jtds.jdbc.ConnectionJDBC3@62e4d539: (connection evicted)
DEBUG 28/05/2019 12:28:58 [springHikariCP connection closer] [] [] [] springHikariCP - Closing connection net.sourceforge.jtds.jdbc.ConnectionJDBC3@66db5dbd: (connection evicted)
DEBUG 28/05/2019 12:28:58 [springHikariCP connection closer] [] [] [] springHikariCP - Closing connection net.sourceforge.jtds.jdbc.ConnectionJDBC3@23d9df02: (connection evicted)
DEBUG 28/05/2019 12:28:58 [main] [] [] [] springHikariCP - After shutdown stats (total=0, active=0, idle=0, waiting=0)
INFO  28/05/2019 12:28:58 [main] [] [] [] springHikariCP - Shutdown completed.

1 个答案:

答案 0 :(得分:0)

这里没有错误,至少在Hikari的意义上没有。日志所说的是您的基于Spring的应用程序正在关闭,这在这里可见:

DEBUG 28/05/2019 12:28:58 [main] [] [] [] HHH000031:闭幕

DEBUG 28/05/2019 12:28:58 [main] [] [] [] Implicitly destroying Boot-strap registry on de-registration of all child ServiceRegistries

Spring正在关闭其应用程序上下文中的所有bean。除此之外,您还会在连接池上收到关闭命令。但这不仅仅是连接池。就是一切。

从启动Spring服务关闭之前的日志中可以看到,您的休眠会话已关闭。这在日志的前一行中可见。

您需要弄清楚为什么您的spring应用程序会关闭,为什么您的hibernate会话会关闭,Hikari关闭只是一个副作用,