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.
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.
Veeranna Ronad wrote:How to terminate these threads. These are created by Tomcat.
Thanks in advance,
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.
An IDE is no substitute for an Intelligent Developer.