IIS BonCode clarification

I would to get some clarification on IIS and using the connector. I’ve been having issues with IIS and having to do iisreset a few times a week and that process is getting old. So I decided to do more reading on the connector.

In the docs this example is given:

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" maxThreads="1000" connectionTimeout="121000" keepAliveTimeout="-1" packetSize="65536" />

In the settings section under MaxConnections (BonCode Apache Tomcat AJP 1.3 Connector) “This should be either zero or correspond to Max JK threads on the tomcat side.” This server receives around 300,000+ visits a month so I have to use the MaxConnections setting, Therefore if I set the MaxConnections to 500 does that mean that maxThreads must also be 500?

Yes the maxThreads attribute corresponds roughly to the IIS MaxConnection. They do not need be identical but should be close whenever possible.

Tehcnically, the maxThreads value in Tomcat can be smaller than the MaxConnection value in Boncode as different patterns are used to maintain the pools. Your particular use case will determine optimal values.

1 Like

Thank you for responding. Is there a way to figure out or have an approx. guess as to what MaxConnection and maxThreads values should be set at?

Unfortunately, there is no easy answer to this. It depends what you are processing and what your code is doing. In most circumstances you need to analyze your load and understand your CPU capacity to handle processing. Then, tweak your values a bit at a time.
The default value for Tomcat maxThreads is 200, so unless you have a dev machine, I would start with a higher number like 500 and go from there. The BonCode MaxConnection IIS values are mostly a corresponding value of this. For example, you can set them 110% of your maxThreads.

Here is a link to a more in depth article on the process of thread count determination:
https://loadforge.com/guides/configuring-thread-pools-for-better-performance-in-tomcat

Hope this helps,
Bilal