简体   繁体   中英

how many threads Tomcat create if i dont define in server.xml

I am using Tomcat 7

I just now installed Tomcat to serve dynamic contents and my apache for php to serve static contents.

while trying to do optimisation, I Was just looking into Server.xml and found below configuration.

<!--
    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
        maxThreads="150" minSpareThreads="4"/>
    -->

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

tomcatThreadPool is commented and it is not used in connector so what it means to me is my tomcat is not considering above setup and not limiting the maxThreads = 150.

So just trying to understand if i keep setup as it is(commented executor) in server.xml then

  1. How many max threads my tomcat will create.
  2. and how many spare threads it will keep.

If any experienced tomcat admin could you please share some info.

Guys please dont guess, by looking at above config i can guess it my self.

Thank you in advance.

Regards, Mona

By default for the HTTP connector, maxThreads is 200 and minSpareThreads is 10. That is, unless an other value is specified or you are using a Executor .

See tomcat documentation for detail.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM