Domanda

I've a tomcat instance with following configuration in

catalina.properties for threads

server.service-Catalina.executor-tomcatThreadPool.maxThreads=300 server.service-Catalina.executor-tomcatThreadPool.minSpareThreads=300

server.service-Catalina.connector.http1.1.executor=tomcatThreadPool server.service-Catalina.connector.http1.1.protocol=HTTP/1.1 server.service-Catalina.connector.http1.1.connectionTimeout=20000 server.service-Catalina.connector.http1.1.acceptCount=300 server.service-Catalina.connector.http1.1.maxKeepAliveRequests=15

I want 300 threads to serve the requests.

With above configuration tomcat starts 300 threads and I can see through JConsole 300 worker threads are running. but when I hit with 300 concurrent requests load the activeCount goes just till 200. Why tomcat is not able to have more than 200 active Threads (parallel threads) processng my requests?

È stato utile?

Soluzione

Through some trials found that its not enough to increase the Executors thread count(maxThreads for Executor element) but also need to increase the Connectors thread count(maxThreads for Connector element). This behavior is actually contradictory to what tomcat documentation says

"A reference to the name in an Executor element. If this attribute is set, and the named executor exists, the connector will use the executor, and all the other thread attributes will be ignored. Note that if a shared executor is not specified for a connector then the connector will use a private, internal executor to provide the thread pool."

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top