Spring Boot project slow startup in Eclipse debug mode

spring boot first request slow
spring boot hibernate slow startup
spring boot takes long time to start
spring boot performance issues
spring boot slow response
eclipse debug mode takes long time
eclipse debugger hangs
method breakpoints may dramatically slow down debugging

I wrote a little Spring project based on mariadb, hibernate, spring-boot and other common libraries in Eclipse. When I run my application normally, it completes its startup in about ten seconds:

2019-11-07 19:53:47.539  INFO 2887 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.3.11.Final}
2019-11-07 19:53:47.541  INFO 2887 --- [           main] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
2019-11-07 19:53:47.687  INFO 2887 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
2019-11-07 19:53:47.799  INFO 2887 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MariaDB103Dialect
2019-11-07 19:53:55.078  INFO 2887 --- [           main] o.h.t.schema.internal.SchemaCreatorImpl  : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl@3400d6fa'
2019-11-07 19:53:55.083  INFO 2887 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2019-11-07 19:53:55.336  INFO 2887 --- [           main] o.h.h.i.QueryTranslatorFactoryInitiator  : HHH000397: Using ASTQueryTranslatorFactory
2019-11-07 19:53:55.681  INFO 2887 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2019-11-07 19:53:55.706  WARN 2887 --- [           main] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2019-11-07 19:53:55.893  INFO 2887 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2019-11-07 19:53:55.897  INFO 2887 --- [           main] petmenu.Application                      : Started Application in 10.373 seconds (JVM running for 11.18)

When I start it in Debug mode, it takes ten times that.

2019-11-07 19:36:40.265  INFO 2108 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.3.11.Final}
2019-11-07 19:36:40.267  INFO 2108 --- [           main] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
2019-11-07 19:36:40.615  INFO 2108 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
2019-11-07 19:36:40.792  INFO 2108 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MariaDB103Dialect
2019-11-07 19:36:48.625  INFO 2108 --- [           main] o.h.t.schema.internal.SchemaCreatorImpl  : HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl@57afe44b'
2019-11-07 19:36:48.628  INFO 2108 --- [           main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2019-11-07 19:36:48.972  INFO 2108 --- [           main] o.h.h.i.QueryTranslatorFactoryInitiator  : HHH000397: Using ASTQueryTranslatorFactory
2019-11-07 19:37:44.033  INFO 2108 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2019-11-07 19:37:51.931  WARN 2108 --- [           main] aWebConfiguration$JpaWebMvcConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2019-11-07 19:38:19.658  INFO 2108 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2019-11-07 19:38:19.722  INFO 2108 --- [           main] petmenu.Application                      : Started Application in 103.693 seconds (JVM running for 105.206)

I noticed that this task in particular takes almost one minute, while it's instantaneous in normal boot.

2019-11-07 19:36:48.972  INFO 2108 --- [           main] o.h.h.i.QueryTranslatorFactoryInitiator  : HHH000397: Using ASTQueryTranslatorFactory

Auto Solution: launch a clean execution of Eclipse.

If you're on your IDE standalone

eclipse --clean

If you're on Spring Tool Suite

STS --clean

You got to use it just once, it will clear its cache and subsequent calls would be useless.

Spring boot project on Tomcat slow on start, Some processes might run only in debug mode, try to connect to the Internet, and bad timeout behaviour / connection handling could result in your delayed startup. 2) How are you launching your app – are you using the regular Server debugging launch configuration or something else like the Spring Boot App launch? Our system based on Spring DM starts too long in Eclipse debug mode. Starting with Run takes about 20 seconds but starting with Debug takes about 110 seconds. System is composed of budles like Domain, Dao, Service etc. I realized that when I comment out transaction and security aspects in Service bundle, the application starts in 22 seconds even in debug mode.

I believe this is normal functionality. Eclipse uses resources and debug mode will use a LOT of resources.

Eclipse jumps to exitCurrentThread when debugging Spring Boot , 0 Create project eclectic upper left corner file-> new-> maven project The foll Intellij IDEA Spring Boot project Debug mode startup slow problem. problem Intellij� Servers->Tomcat->Debug. 3) No. i’ll try. 4) When i start the debug the applications starts correctly and i can see the spring boot log in the console window but for example the boot phase. For example: With Debug on: Root WebApplicationContext: initialization completed in 330984 ms (and the web app is not started yet)

For Spring Boot you can set this in your application.properties file:

spring.jpa.properties.hibernate.temp.use_jdbc_metadata_defaults=false

and

spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect

Java: slow performance or hangups when starting debugger and , Why does Eclipse not react so weirdly to entries in the hosts ?? Our application works in Run mode and hangs in Debug mode. it would start but when it starts, it won't go away until you restart the workstation (Chrome or� In Eclipse, from the toolbar, select Run -> Debug Configurations -> select Remote Java Application -> click the New button -> select as Connection Type Standard (Socket Attach), as Host localhost, and as Port 8002 (or whatever you have configured in the steps before). Click Apply and then Debug.

I select skip all breakpoints option under the run or press (CTRL+ALT+B) as shortkey. For my STS, debug mode start was faster than before

Spring boot application takes several minutes (5, A spring boot application takes very long to start (usually between 5 and 30 I will attach a log file of the local server startup (from intellij) with level DEBUG. I consider application startup of 5 minutes on the server still too slow, but could live with it. did not find required classes 'org.eclipse.jetty.server. Finally, you’ll learn how to remotely debug the REST interface with IntelliJ IDEA (2019.1) and Eclipse (2019-03). Project setup. For the application, I’ve chosen a simple Spring Boot 2.3 application. It includes an embedded H2 database and JPA to serve books, which are randomly generated on startup.

Faster Spring Boot startup, Is your Spring Boot application startup quite slow? Are you tired of waiting for application setup? You can achieve faster Spring Boot startup� Hides the Spring Boot startup banner by adding the -Dspring.main.banner-mode=OFF VM option (for Spring Boot 1.4.x and earlier, the option is -Dspring.main.banner=false). Enable launch optimization Select this option to speed up application launch.

Spring Tool Suite 3.7.1 - New and Noteworthy, The default STS distribution is now based on the recently released Eclipse This gives you an easy way to just start (in debug or run mode) or stop them right from for cetain situations, it usually is too slow for your everyday debugging work. 4) Configure appropriate start-up arguments. In your eclipse.ini file (inside eclipse installation folder) change the default -Xms40m -Xmx256m arguments as per your needs. This option defines the minimum and maximum memory usage bounds which are passed to java virtual memory to manage eclipse application’s memory allocation tolerance.

Spring Tool Suite 3.7.3 - New and Noteworthy, The default STS distribution is now based on the recently released Eclipse Mars. 2 You can start/debug/stop them, jump to the associated console view, open a To help you deal with multiple launch configs for a project, the context menu got Spring Boot Dashboard: advanced support for Cloud Foundry manifest files . The default installation of Eclipse does not support Spring or Spring Boot out of the box. However, there is a Spring Tools add-on available in the Eclipse Marketplace that provides Spring support comparable to IntelliJ. Most notably the add-on provides a Boot Dashboard that lets us manage multiple Spring Boot applications from a single place:

Comments
  • Try to set the log level to DEBUG, you may see more info. Make sure you have enough memory for eclipse and the project - use eg. jvisualvm to see. Check if you have active breakpoints (specially on fields), try to deactivate them. In the end, you may run with profiler like Java Flight Recorder.
  • It seems to me a difference too large. Until some time ago I got a delay under 10 secs. But I can't find what could be the change I made that triggers the problem.
  • The second one is obviously Postgre-related. I use MariaDB and set the correct dialect together with the first property but nothing changed.
  • I tried set these properties but I did not observe obvious positive change on the speed of STS