Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Login to web application becomes very slow or tomcat doesn't respond

 
Veeranna Ronad
Greenhorn
Posts: 3
Chrome Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

My web app stops responding once the client connection (IE) reaches to 160 users. I found from JConsole, there are too many threads created and the period when the login to web app was not happening, during this time (between 14.30 to 14.40 hours), the number of live thread count has increased. At this time when user tried login, an error message "Page cannot be found" message displayed on the IE.

Kindly advice me to debug this issue.

Thanks in advance,

Best,
Veeranna Ronad.
classes2.jpg
[Thumbnail for classes2.jpg]
Thread graph recorded from JConsole
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That can certainly happen if threads are not terminating properly.

When this happened to me I discovered what was going on with the Tomcat Management app - it showed a whole bunch of very long lived request Threads. Turned out they were all waiting for a resource that was no longer on the system.

Bill
 
Veeranna Ronad
Greenhorn
Posts: 3
Chrome Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tested with a sample application. Even when all the clients are closed (disconnected) from Tomcat, threads are not terminated.

Best,
Veeranna Ronad.
 
Veeranna Ronad
Greenhorn
Posts: 3
Chrome Firefox Browser Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to terminate these threads. These are created by Tomcat.

Thanks in advance,
Best,
Veeranna Ronad.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18154
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Veeranna Ronad wrote:How to terminate these threads. These are created by Tomcat.

Thanks in advance,
Best,
Veeranna Ronad.


There are a lot of threads created by Tomcat that are placed in thread pools and handed out as needed to satisfy things like incoming HTTP requests. Although the thread was created by Tomcat and is maintained by Tomcat, once the thread has been given a task to do, the thread is running user-written task code. If the user-written code does not terminate, the thread is held hostage by the user-written code, since only when the user code finishes will the thread be returned to Tomcat.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic