John3245
John3245

Reputation: 307

Jetty taking too much time to start

I have JRE 1.8.0_40 and Jetty 9.2.10. I am simply doing java -jar start.jar. This take 35 sec to 42 sec to start Jetty. Is it ok in case of newer version of Jetty because older one (Jetty - 7.0.0) took only 2 to 3 sec to start Jetty

Platform : Windows 2008 R2 server

Upvotes: 0

Views: 3852

Answers (2)

Stephen C
Stephen C

Reputation: 718798

I suspect that the slow startup in Jetty 9.2.10 is caused by annotation scanning. This wiki page describes the problem and provides a remedy:

As the page says:

"Since servlet 3.0 (supported by jetty-8.x), there has been the added requirement that both container and webapp jars can be scanned."


Some further research suggests that there are other plausible explanations. If the solution in the above wiki page doesn't help, I suggest that you:

  • Turn on verbose logging an try to narrow down what phase of the startup is taking the time.

  • Attach a profiler and find out where the startup code hotspots are.

  • Use external performance monitoring (e.g. the Windows Task Manager) to see if the JVM is busy or idle during the long startup.

These should give you some clues to help you / us diagnose the real problem.

Upvotes: 3

yurko
yurko

Reputation: 1562

Do you have many web applications/ big application there? It could be a problem of slow unwrapping a big war file.

Upvotes: 0

Related Questions