Server Configuration
Thread and Queue Settings
When to Adjust These Settings
Under high load, a web service may receive more requests than it can process immediately. This can lead to increased response times, timeouts and rejected requests. When that happens, a potential solution is to increase the number of threads that handle requests or to use a queue.
Before making changes to the configuration, check if there are any problematic web services in particular that can be optimized
Configuration Options
In the instance configuration, you can adjust the following properties to control how concurrent requests are processed:
| Property | Default | Description |
|---|---|---|
jditoWebserviceMaxThreadCount | 10 | Maximum number of threads that can process HTTP requests simultaneously |
jditoWebserviceMinThreadCount | 1 | Minimum number of threads waiting to service requests (requires version >= 2026.0.1) |
jditoWebserviceMaxQueued | 0 | Maximum number of requests that can be queued |
If jditoWebserviceMaxQueued is set to -1, the length of the queue won't be limited and calls are never rejected.
How the Thread Executor works
If the server receives more multiple requests simultaneously, the thread pool executor will process them with the following strategy:
- Distribute the requests over the active threads (
jditoWebserviceMinThreadCount) - When all existing threads are busy and the queue is enabled (
jditoWebserviceMaxQueued> 0), incoming requests will be queued - When the queue is full or disabled, additional threads will be spawned to process requests until to the limit defined by
jditoWebserviceMaxThreadCountis reached. Any further requests will be rejected.
Thread Count vs Queue Size
If the server starts dropping requests under sustained load and higher resource usage is acceptable, increase the thread count settings to allow more concurrent handling. Avoid excessive thread counts as it may cause resource exhaustion. You can use the queue to smooth short spikes by buffering incoming requests, but avoid very large or unlimited queues as they increase latency and memory use. A queue won't help when there are a lot of requests constantly. Keep monitoring latency and error rates after changes to find the optimal settings.