[SINCE Orbeon Forms 4.8]
The limiter filter is a servlet filter designed to limit the number of concurrent form processing requests, in order to reduce the likelihood of the server running out of resources.
Loading Form Runner pages and updating form state can be CPU and memory intensive, and a high level of concurrency for these operations is not desirable (even as we are working to improve the level of concurrency).
In the worst case, a large number of concurrent requests will compete for CPU and memory, causing slowdowns and possibly causing the server to run out of memory. In other cases, throughput can still be non-optimal.
It is therefore more efficient, past a certain level of concurrency, to serialize requests. Default Servlet containers settings are usually not adapted (Tomcat for example sets the default at 200 threads). They usually allow you to reduce the number of concurrent threads (Tomcat for example has settings on the
<Connector>element), but these settings have drawbacks:
- Tomcat has a minimum of 10 concurrent threads.
- Other containers have settings which are very hard to figure out.
- Only some heavy requests must be serialized.
Therefore Orbeon Forms ships with a filter which implements the limiting mechanism internally.
The filter is enabled by default in Orbeon Forms 4.8. It is configured in
Here is a typical configuration:
<!-- Include Form Runner pages and XForms Ajax requests -->
<!-- Exclude resources not produced by services -->
<!-- Minimum, requested, and maximum number of concurrent threads allowed -->
<!-- The `x` prefix specifies a multiple of the number of CPU cores reported by the JVM -->
The filter applies to all incoming requests. However, internally, the filter only limits requests matching paths which:
- match the
includeparameter regular expression
- and do not match the
excludeparameter regular expression
The default settings are meant to apply to:
- requests for forms
- XForms Ajax requests
but not to:
- file uploads
The number of threads which can run concurrently is based on the number of CPUs advertised by the JVM. This typically includes hyperthreading: for example, a laptop with 4 cores advertises 8 "CPUs".
In the configuration,
x1means the advertised number of CPUs,
x2means twice that,
.5xmeans half that, etc. A fixed integer number can also be set.
The effective maximum number of concurrent threads allowed by the filter is:
num-threadsis smaller than
num-threadsis bigger than
num-threadsin all other cases
Remove or comment-out the relevant