Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

What should be the ideal time of starting up the tomcat ?

Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am facing one serious issue as Tomcat server takes much time to start.
I have different applications to work on in day and found that in 2 applications, Tomcat takes more than 3 minutes to start but int my main project it takes more than 5 minutes or even more.

I want to know that is it normal or i need to change some parameters to make it faster ?

Appreciate your any kind of help.

Saloon Keeper
Posts: 6508
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat itself starts up pretty quickly. Maybe there's a lot of initialization work being done in context listeners and similar constructs that get executed at startup time? Maybe some of that could run in a background thread asynchronously instead.
Saloon Keeper
Posts: 22248
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Consider yourself lucky.

I one took over a web app that would take 20 minutes to start up. The original author was fool enough to attempt to load half the database into RAM in the init method of one of his servlets. I modified it to use just-in-time fetching and the startup time dropped to 30 seconds.

One of the things that made Tomcat (and jetty) so popular was that the full-stack J2EE servers like WebSphere did take an excruciatingly long time to start. But Tomcat itself only takes maybe 20 seconds. All the other time is in the starting of the webapps. Ideally a single webapp would take no more than 60 seconds to launch, but that depends on how the app was designed, not on Tomcat.
Normally trees don't drive trucks. Does this tiny ad have a license?
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic