Having got nowhere with my previous query ( "Consecutive threads" ) I've tried to create a much simpler example.
I modified the "Hello World" servlet to introduce a delay of around a minute ( by adding a count loop ). I also made a copy of it as another servlet. I then made about 12 calls to the two servlets. No more than two threads were ever running. I could see from my browser that they were effectively running one after the other. Why only two rather than maxThreads? In my real-world problem a slow thread holds up a whole stack of fast threads as they don't even start until it has finished. The Server Configuration Reference ( http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/http.html ) states: "At server startup time, this Connector will create a number of request processing threads (based on the value configured for the minSpareThreads attribute). Each incoming request requires a thread for the duration of that request. If more simultaneous requests are received than can be handled by the currently available request processing threads, additional threads will be created up to the configured maximum (the value of the maxThreads attribute). If still more simultaneous requests are received, they are stacked up inside the server socket created by the Connector, up to the configured maximum (the value of the acceptCount attribute. Any further simultaneous requests will receive "connection refused" errors, until resources are available to process them." This doesn't seem to happen in my case. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
