/**
* The maximum number of idle processors that will be retained in the cache
- * and re-used with a subsequent request. The default is -1, unlimited,
- * although in that case there will never be more Processor objects than
- * there are threads in the associated thread pool.
+ * and re-used with a subsequent request. The default is 200. A value of -1
+ * means unlimited. In the unlimited case, the theoretical maximum number of
+ * cached Processor objects is {@link #getMaxConnections()} although it will
+ * usually be closer to {@link #getMaxThreads()}.
*/
- protected int processorCache = -1;
+ protected int processorCache = 200;
public int getProcessorCache() { return this.processorCache; }
public void setProcessorCache(int processorCache) {
this.processorCache = processorCache;
setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
- setProcessorCache(-1);
}
private final Http11ConnectionHandler cHandler;
setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
- setProcessorCache(200);
}
setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
- setProcessorCache(200);
}
if it is configured for SSL and an invalid value is provided for
SSLProtocol. (markt)
</fix>
+ <fix>
+ Align all the connector implementations with the documented default
+ setting for processorCache of 200. This changes the default from -1
+ (unlimited) for the AJP-BIO, AJP-APR and HTTP-APR connectors. Additional
+ information was also added to the documentation on how to select an
+ appropriate value.
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
<attribute name="processorCache" required="false">
<p>The protocol handler caches Processor objects to speed up performance.
This setting dictates how many of these objects get cached.
- <code>-1</code> means unlimited, default is <code>200</code>. Set this
- value somewhere close to your maxThreads value.</p>
+ <code>-1</code> means unlimited, default is <code>200</code>. If not using
+ Servlet 3.0 asynchronous processing, a good default is to use the same as
+ the maxThreads setting. If using Servlet 3.0 asynchronous processing, a
+ good default is to use the larger of maxThreads and the maximum number of
+ expected concurrent requests (synchronous and asynchronous).</p>
</attribute>
<attribute name="requiredSecret" required="false">
<attribute name="processorCache" required="false">
<p>The protocol handler caches Processor objects to speed up performance.
This setting dictates how many of these objects get cached.
- <code>-1</code> means unlimited, default is <code>200</code>. Set this
- value somewhere close to your maxThreads value.</p>
+ <code>-1</code> means unlimited, default is <code>200</code>. If not using
+ Servlet 3.0 asynchronous processing, a good default is to use the same as
+ the maxThreads setting. If using Servlet 3.0 asynchronous processing, a
+ good default is to use the larger of maxThreads and the maximum number of
+ expected concurrent requests (synchronous and asynchronous).</p>
</attribute>
<attribute name="restrictedUserAgents" required="false">