Skip to main content

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.

tip

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:

PropertyDefaultDescription
jditoWebserviceMaxThreadCount10Maximum number of threads that can process HTTP requests simultaneously
jditoWebserviceMinThreadCount1Minimum number of threads waiting to service requests (requires version >= 2026.0.1)
jditoWebserviceMaxQueued0Maximum number of requests that can be queued
info

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:

  1. Distribute the requests over the active threads (jditoWebserviceMinThreadCount)
  2. When all existing threads are busy and the queue is enabled (jditoWebserviceMaxQueued > 0), incoming requests will be queued
  3. When the queue is full or disabled, additional threads will be spawned to process requests until to the limit defined by jditoWebserviceMaxThreadCount is 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.