This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Tomcat is Very Slow Recently  RSS feed

 
Amitha Prabath
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have Tomcat8 as well as Tomcat7 servers which runs on Ubuntu servers. From three days time I noticed both Tomcat versions app deployment is drastically slow. For some server when I restart the server two times the problem solves to some extent but it prevails after some period. What could be the reason? Those servers worked perfectly before.

Kind Regards,
 
Tim Holloway
Bartender
Posts: 18702
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Amitha!

Unfortunately, "It always worked before" is a really bad excuse for problems. It's what I hear, for example, when someone did something that totally violated standards but "worked perfectly". Right up to the point where the loophole they'd been using failed.

Tomcat doesn't "run slow". Tomcat is very lightweight, so mostly it's just shuttling requests between client and server. For Tomcat itself to run slow would mean that the VM it's running in was severely starved for resources.

So, for example, if Tomcat is running slow, you should check to make sure that the machine that Tomcat is running on has enough physical RAM that it isn't thrashing virtual memory.

On the other hand, inefficient web applications are a rupee a dozen. I had one webapp that would do an eager fetch of half the contents of a database when it was first deployed and it would routinely take 20+ minutes to start up. I changed it to lazy-fetch the data and startup time dropped to under 30 seconds.

So first, make sure that Tomcat has enough OS resources available to run in.

Second, check the webapps for performance issues.

You may also be subject to indirect performance hits. For example, if a webapp fetches 100 records on startup, but the database server is slow responding. Usually other people/apps will see problems like this too, but sometimes you'll be the lucky person to discover it.
 
Amitha Prabath
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tim,

Thanks for the information. I have those two Tomcat servers in different VMware hyper visors. I checked the resources and that was fine. Then my only concern is the java applications (war files) that has been deployed on this Tomcat server as you said.

Thanks a lot
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!