Thanks Mark. I normally see around 20 active http connections and around 10 active NIO threads. Why isn't there a 1-to-1 ratio between active http connections and active nio threads? What is happening when a connection is "active" but it isn't being processed via the filter chain?
On Thu, Feb 11, 2016 at 2:59 PM, Mark Thomas <ma...@apache.org> wrote: > On 11/02/2016 21:54, Bart Wood wrote: > > Will the NIO connector reuse a thread for multiple http connections in > > flight? > > No. Once a thread enters the filter chain it is dedicated to that > request until it exists the filter chain (plus some Tomcat internal > processing). > > > For example, an nio thread begins processing a request for an http > > connection. The thread begins blocking on a slow database socket read. > Will > > Tomcat let the thread be reused in flight for other http connections? If > > code was storing data in thread local storage I'd imagine there could be > > problems. > > ThreadLocals are problematic in a container environment for all sorts of > reasons. See the archives for details. > > Mark > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >