This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Login to web application becomes very slow or tomcat doesn't respond Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Login to web application becomes very slow or tomcat doesn Watch "Login to web application becomes very slow or tomcat doesn New topic
Author

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

Veeranna Ronad
Greenhorn

Joined: Apr 05, 2011
Posts: 3

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.



[Thumbnail for classes2.jpg]

William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
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

Joined: Apr 05, 2011
Posts: 3

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

Joined: Apr 05, 2011
Posts: 3

How to terminate these threads. These are created by Tomcat.

Thanks in advance,
Best,
Veeranna Ronad.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
jQuery in Action, 2nd edition
 
subject: Login to web application becomes very slow or tomcat doesn't respond
 
Similar Threads
Issue while Posting data using navigateToURL
Internet Explorer - HTTP Status 408 - The time allowed for the login process has been exceeded
SSL Session Loss on Large Message on IE 8
Icon in a web app ?
Strange response.sendRedirect() problem