Description
Hello,
After 2.1.3.RELEASE -> 2.1.4.RELEASE upgrade our tests starts hangs after success execution without any errors on GitLab CI as well as locally with gradle run from ommand line. Running from IDEA still works fine. I cannot see anything unusual from logs, only these lines is available before it hangs after success test execution:
GitLab CI:
rest.auth.REST API GET authorization tests > should show fallback response on any 404 GET requests() PASSED
2019-04-10 12:54:22.305 INFO 597 --- [ Thread-86] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2019-04-10 12:54:22.306 INFO 597 --- [ Thread-27] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2019-04-10 12:54:22.306 INFO 597 --- [ Thread-64] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
same happening if I'm running tests locally with gradle test command
I cannot share code base because of NDA, but we are using WebFlux REST API + WebFluxSecurity on a web layer and H2 in-memory DB together with spring-data-jpa for persistent layer.
after enabling debug mode, I found this repeatable logs from Hikari pool
2019-04-10 17:00:29.408 INFO 7108 --- [ Thread-80] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2019-04-10 17:00:29.408 DEBUG 7108 --- [ Thread-80] o.hibernate.internal.SessionFactoryImpl : HHH000031: Closing
2019-04-10 17:00:29.408 DEBUG 7108 --- [ Thread-80] o.h.type.spi.TypeConfiguration$Scope : Un-scoping TypeConfiguration [org.hibernate.type.spi.TypeConfiguration$Scope@c25162b7] from SessionFactory [org.hibernate.internal.SessionFactoryImpl@1cac9993]
2019-04-10 17:00:29.409 INFO 7108 --- [ Thread-31] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2019-04-10 17:00:29.409 INFO 7108 --- [ Thread-59] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2019-04-10 17:00:29.409 DEBUG 7108 --- [ Thread-31] o.hibernate.internal.SessionFactoryImpl : HHH000031: Closing
2019-04-10 17:00:29.409 DEBUG 7108 --- [ Thread-59] o.hibernate.internal.SessionFactoryImpl : HHH000031: Closing
2019-04-10 17:00:29.410 DEBUG 7108 --- [ Thread-59] o.h.type.spi.TypeConfiguration$Scope : Un-scoping TypeConfiguration [org.hibernate.type.spi.TypeConfiguration$Scope@9a066eba] from SessionFactory [org.hibernate.internal.SessionFactoryImpl@3f4e04a4]
2019-04-10 17:00:29.410 DEBUG 7108 --- [ Thread-31] o.h.type.spi.TypeConfiguration$Scope : Un-scoping TypeConfiguration [org.hibernate.type.spi.TypeConfiguration$Scope@93c84a9] from SessionFactory [org.hibernate.internal.SessionFactoryImpl@c3be385d]
2019-04-10 17:00:29.411 DEBUG 7108 --- [ Thread-80] o.h.s.i.AbstractServiceRegistryImpl : Implicitly destroying ServiceRegistry on de-registration of all child ServiceRegistries
2019-04-10 17:00:29.411 DEBUG 7108 --- [ Thread-80] o.h.b.r.i.BootstrapServiceRegistryImpl : Implicitly destroying Boot-strap registry on de-registration of all child ServiceRegistries
2019-04-10 17:00:29.411 DEBUG 7108 --- [ Thread-59] o.h.s.i.AbstractServiceRegistryImpl : Implicitly destroying ServiceRegistry on de-registration of all child ServiceRegistries
2019-04-10 17:00:29.411 DEBUG 7108 --- [ Thread-31] o.h.s.i.AbstractServiceRegistryImpl : Implicitly destroying ServiceRegistry on de-registration of all child ServiceRegistries
2019-04-10 17:00:29.412 DEBUG 7108 --- [ Thread-59] o.h.b.r.i.BootstrapServiceRegistryImpl : Implicitly destroying Boot-strap registry on de-registration of all child ServiceRegistries
2019-04-10 17:00:29.412 DEBUG 7108 --- [ Thread-31] o.h.b.r.i.BootstrapServiceRegistryImpl : Implicitly destroying Boot-strap registry on de-registration of all child ServiceRegistries
2019-04-10 17:00:34.766 DEBUG 7108 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Pool stats (total=10, active=1, idle=9, waiting=0)
2019-04-10 17:00:48.943 DEBUG 7108 --- [l-2 housekeeper] com.zaxxer.hikari.pool.HikariPool : HikariPool-2 - Pool stats (total=10, active=1, idle=9, waiting=0)
2019-04-10 17:00:55.478 DEBUG 7108 --- [l-3 housekeeper] com.zaxxer.hikari.pool.HikariPool : HikariPool-3 - Pool stats (total=10, active=1, idle=9, waiting=0)
2019-04-10 17:01:04.768 DEBUG 7108 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Pool stats (total=10, active=1, idle=9, waiting=0)
2019-04-10 17:01:18.946 DEBUG 7108 --- [l-2 housekeeper] com.zaxxer.hikari.pool.HikariPool : HikariPool-2 - Pool stats (total=10, active=1, idle=9, waiting=0)
2019-04-10 17:01:25.480 DEBUG 7108 --- [l-3 housekeeper] com.zaxxer.hikari.pool.HikariPool :
# waiting some time....
2019-04-10 17:29:48.159 DEBUG 7108 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-3 - Added connection conn39: url=jdbc:h2:mem:db user=SYSTEM
2019-04-10 17:29:49.098 DEBUG 7108 --- [l-2 housekeeper] com.zaxxer.hikari.pool.HikariPool : HikariPool-2 - Pool stats (total=10, active=1, idle=9, waiting=0)
2019-04-10 17:29:50.835 DEBUG 7108 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-2 - Closing connection conn16: url=jdbc:h2:mem:db user=SYSTEM: (connection has passed maxLifetime)
2019-04-10 17:29:50.836 DEBUG 7108 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-2 - Added connection conn40: url=jdbc:h2:mem:db user=SYSTEM
2019-04-10 17:29:55.625 DEBUG 7108 --- [l-3 housekeeper] com.zaxxer.hikari.pool.HikariPool : HikariPool-3 - Pool stats (total=10, active=1, idle=9, waiting=0)
2019-04-10 17:29:57.325 DEBUG 7108 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Closing connection conn4: url=jdbc:h2:mem:db user=SYSTEM: (connection has passed maxLifetime)
2019-04-10 17:29:57.328 DEBUG 7108 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection conn41: url=jdbc:h2:mem:db user=SYSTEM
2019-04-10 17:29:57.922 DEBUG 7108 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-3 - Closing connection conn27: url=jdbc:h2:mem:db user=SYSTEM: (connection has passed maxLifetime)
2019-04-10 17:29:57.925 DEBUG 7108 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-3 - Added connection conn42: url=jdbc:h2:mem:db user=SYSTEM
2019-04-10 17:29:58.023 DEBUG 7108 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-2 - Closing connection conn12: url=jdbc:h2:mem:db user=SYSTEM: (connection has passed maxLifetime)
2019-04-10 17:29:58.025 DEBUG 7108 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-2 - Added connection conn43: url=jdbc:h2:mem:db user=SYSTEM
2019-04-10 17:29:58.045 DEBUG 7108 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Closing connection conn1: url=jdbc:h2:mem:db user=SYSTEM: (connection has passed maxLifetime)
2019-04-10 17:29:58.046 DEBUG 7108 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection conn44: url=jdbc:h2:mem:db user=SYSTEM
2019-04-10 17:29:58.558 DEBUG 7108 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-2 - Closing connection conn17: url=jdbc:h2:mem:db user=SYSTEM: (connection has passed maxLifetime)
2019-04-10 17:29:58.558 DEBUG 7108 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-2 - Added connection conn45: url=jdbc:h2:mem:db user=SYSTEM
2019-04-10 17:29:58.628 DEBUG 7108 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-3 - Closing connection conn24: url=jdbc:h2:mem:db user=SYSTEM: (connection has passed maxLifetime)
2019-04-10 17:29:58.629 DEBUG 7108 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-3 - Added connection conn46: url=jdbc:h2:mem:db user=SYSTEM
2019-04-10 17:30:00.001 DEBUG 7108 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-2 - Closing connection conn18: url=jdbc:h2:mem:db user=SYSTEM: (connection has passed maxLifetime)
2019-04-10 17:30:00.004 DEBUG 7108 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-2 - Added connection conn47: url=jdbc:h2:mem:db user=SYSTEM
2019-04-10 17:30:02.647 DEBUG 7108 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Closing connection conn7: url=jdbc:h2:mem:db user=SYSTEM: (connection has passed maxLifetime)
2019-04-10 17:30:02.648 DEBUG 7108 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection conn48: url=jdbc:h2:mem:db user=SYSTEM
2019-04-10 17:30:03.476 DEBUG 7108 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-2 - Closing connection conn15: url=jdbc:h2:mem:db user=SYSTEM: (connection has passed maxLifetime)
2019-04-10 17:30:03.477 DEBUG 7108 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-2 - Added connection conn49: url=jdbc:h2:mem:db user=SYSTEM
2019-04-10 17:30:04.919 DEBUG 7108 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Pool stats (total=10, active=1, idle=9, waiting=0)
2019-04-10 17:30:10.240 DEBUG 7108 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-2 - Closing connection conn11: url=jdbc:h2:mem:db user=SYSTEM: (connection has passed maxLifetime)
2019-04-10 17:30:10.242 DEBUG 7108 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-2 - Added connection conn50: url=jdbc:h2:mem:db user=SYSTEM
2019-04-10 17:30:16.023 DEBUG 7108 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-2 - Closing connection conn19: url=jdbc:h2:mem:db user=SYSTEM: (connection has passed maxLifetime)
2019-04-10 17:30:16.024 DEBUG 7108 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-2 - Added connection conn51: url=jdbc:h2:mem:db user=SYSTEM
2019-04-10 17:30:16.462 DEBUG 7108 --- [nnection closer] com.zaxxer.hikari.pool.PoolBase : HikariPool-2 - Closing connection conn14: url=jdbc:h2:mem:db user=SYSTEM: (connection has passed maxLifetime)
2019-04-10 17:30:16.463 DEBUG 7108 --- [onnection adder] com.zaxxer.hikari.pool.HikariPool : HikariPool-2 - Added connection conn52: url=jdbc:h2:mem:db user=SYSTEM
# Killed / skipped rest
I'm really not sure what is going wrong. but with spring-boot 2.1.3.RELEASE everything was work correctly...
update 1
I have reduced max-lifetime to 3000 and even to 0:
spring:
datasource:
hikari:
max-lifetime: 3000
but it doesn't helped me to solve a problem, so I reduced idle-timeout down to 3 sec:
spring:
datasource:
hikari:
idle-timeout: 3000
... and now my tests randomly worked locally but issue still wasn't solved
update 2
Finally I found root cause. It was dev-tools runtime dependency... so I removed it and now test back to normal
Not sure if issue can be closed, seems like additional Gradle jvmargs tuning is required when using DevTools
Regards,
Maksim