0

I'm writing and application (Angula Dart for front end, Spring Boot for back end) and I have a backbone of functionality already up. I'm facing an issue now, time to tome (can't say if there is a specific timing or if is pure random) the application shutdown itself.

[ionShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2021-12-14 18:11:27.551  INFO 278601 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
2021-12-14 18:11:27.568  INFO 278601 --- [ionShutdownHook] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.

Before those log line the application is working without any problems (there is a certai amount of inactivity of the server, it recives few requestes over the day).

This is the command i use to launch the app

java -Duser.country=IT -Duser.language=it -Dserver.port=4499 -jar whServer.jar > whServer.log 2> whServer-error.log&

Before the shtdown there are no applicative errors

Razlo3p
  • 455
  • 2
  • 7
  • 28
  • 1
    Please see if this helps https://stackoverflow.com/questions/53259267/spring-boot-hikari-pool-shutdown-early-error – JCompetence Dec 15 '21 at 11:28
  • 1
    Something is triggering the shutdown. Without seeing that log or now how you have deployed your app? This will be impossible to answer. I suspect you are deploying/running your app on some containerization (kubernetes?) or linux. The first will shutdown the app after inactivity or memory issues, the latter due to taking up too much memory. – M. Deinum Dec 15 '21 at 12:55
  • @M.Deinum i updated the original question with some more info, hope it helps – Razlo3p Dec 16 '21 at 13:06
  • 1
    Check the memory, linux might be shutting down the process if it consumes too much memory. – M. Deinum Dec 16 '21 at 13:19
  • @M.Deinum the application is so small that i doubt is eating memory. There is a way to dump the memory usage at the time to see how much used when is happening? – Razlo3p Dec 16 '21 at 16:23
  • 1
    The fact that it is a small application doesn't mean it cannot use a lot of memory when badly written! As you are on a linux variant check what the reasons are for shutting down processes and eliminate them one by one. Also you probably don't want to start it the way you are starting it now (from a shell I assume as background process) but rather as a proper process using the proper system tools. – M. Deinum Dec 17 '21 at 06:56
  • @M.Deinum How can i run not as background job, followed spring-boot guide but now i'm missing some point – Razlo3p Dec 17 '21 at 09:12
  • You are running it from bash (or whatever shell you are using) as a background process. Where you really want to run it as a proper linux service (how to do that depends on what you are using to running services). – M. Deinum Dec 17 '21 at 09:31

0 Answers0