Child pages
  • Tuning the Tomcat Container

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

OptionDescription
maxConnections

The maximum number of connections that the server will accept and process at any given time:

  • default is 10,000 for BIO or 8192 for NIO/ NIO2
  • For NIO/ NIO2, this value can be set to -1 and connections will not be counted.
connectionTimeout

The available time for connecting to a server-side socket, before timing out and abandoning the connection attempt.

soTimeout

The socket timeout, after which the request is deemed to have failed.

acceptCountThe maximum queue length to queue incoming requests when all threads are busy - default is 100.
executor

An Executor can be configured to manage the Connector  thread-pool - rather than configuring thread-based options directly on the Connector . This supports the sharing of an Executor  between Connector s. Note that this is specially recommended to provide finer control over server resources, notably threads.

Refer to Executor config.

maxThreads

The maximum number of request processing threads to be created by this Connector, which therefore determines the maximum number of simultaneous requests that can be handled - default is 200. This can also be configured via the executor.

Note

GSA: I would just focus on executor options (there is a maxThreads here as well)

WM: There is... The thing is, the executor  is actually intended to allow multiple Connector s to use a single Executor  (with common config). If a Connector  does not have this configured then it uses its own config, which in turn actually creates :drumroll: an Executor for it to use (privately).

Maybe I should make a note of this?

GSA: that looks like to me that executor is the Tomcat "supported" way, while maxThreads are still here for backward compatibility

(Will remove Tuesday 30/6/2020 if no further comment)

minSpareThreads

The minimum number of threads that should be available, idle or active, at any given time - default 10. This can also be configured via the executor.

Note

GSA: probably part of the executor config right ?

WM: It's part of both - plain `Connector` and a `Connector#executor` config.


(Will remove Tuesday 30/6/2020 if no further comment)

...