0

Hi in tomcat6 server.xml I have one connector for catalina service. And I set maxThreads=5:

  <Service name="Catalina">
        <Connector port="8090" maxThreads="5" protocol="HTTP/1.1" />

But after restarting tomcat I can see more then 5 threads created. Why is maxThreads property ignored?

tefozi
  • 101
  • 2
  • how are you testing for maxthread > 5 ? Is it more than 5 concurrent requests you can see? – JoseK Dec 14 '10 at 07:01
  • I'm running htop and I can see about 25-35 tomcat java threads running – tefozi Dec 14 '10 at 08:09
  • 1
    AFAIK, the maxthreads does not control the number of child processes forked by Tomcat. It only controls the number of concurrent requests which Tomcat can handle. – shinynewbike Dec 14 '10 at 10:17
  • Excerpt from the docs: "...If an executor is associated with this connector, this attribute is ignored as the connector will execute tasks using the executor rather than an internal thread pool." Do you have an executor configured? – Milen A. Radev Dec 14 '10 at 15:35
  • No I don't have executor. – tefozi Dec 15 '10 at 16:01
  • @shinynewbike Ok I got it. As threads I was thinking as a child processes. – tefozi Dec 15 '10 at 16:02

1 Answers1

2

You have defined the http worker threads. Tomcat also needs some more like timer, ajp, jmx etc. You can control your existing threads for example with JVisualVM, bundeled with Oracles JVM.