Rallavagu, On 1/19/16 6:14 PM, Rallavagu wrote: > > > On 1/19/16 2:43 PM, Mark Thomas wrote: >> On 19/01/2016 22:36, Rallavagu wrote: >>> Also, it could be keep-alive for client connection as well. In any case, >>> how long a keep-alive connection will be in this state by default? >>> Thanks. >> >> This behaviour is entirely normal. Why are you concerned about it? > > I was analyzing thread dump as the application experiences sudden high > response times and eventually becomes normal. > >> >> Regarding how long the thread will be in this state, the default >> keep-alive timeout for the HTTP BIO connector can be found in the >> documentation. >> (Yes, I do happen to know what it is but think of this as an exercise >> for the reader.) > > From the documentation keepAliveTimeout defaults to connectionTimeout. > > > "The number of milliseconds this Connector will wait, after accepting a > connection, for the request URI line to be presented. Use a value of -1 > to indicate no (i.e. infinite) timeout. The default value is 60000 (i.e. > 60 seconds) but note that the standard server.xml that ships with Tomcat > sets this to 20000 (i.e. 20 seconds). Unless disableUploadTimeout is set > to false, this timeout will also be used when reading the request body > (if any)."
You might want to consider switching to an NIO-based connector. The NIO-based connectors do not block a request-processing thread during the keep-alive wait time, so fewer threads can handle the same number of actual incoming requests (instead of waiting-around potentially doing no additional work). You may still have a response-time problem after that, but it won't be due to the threading model. If your load-balancer configured to maintain keep-alive connections to your Tomcat instance(s)? If so, what are the details of that configuration? -chris --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org