Optimize the Check Request Queue

When all language servers are busy, the core server puts new checking requests in a queue ordered by priority and start time. By default, the core server gives a low priority to checking requests that are over 1 MB, or are part of a batch check. All other checking requests are given a standard priority.

Checking requests are prioritized during peak usage periods so that users who run standard checks aren’t kept waiting by users who ran batch checks or who checked large documents during the same time period. By default, a checking request can stay at a low priority for a maximum of 5 minutes.

For example, at 12:00 your language server might be busy processing a large checking request that will take about 6 minutes to complete. In the meantime, the core server receives the following checking requests that it needs to add to the queue:

Check StartedDocument
12:01:00Large document
12:03:00Batch-checked documents
12:05:00Standard document 1

After assessing the priority of each document, the core server reorders the queue as follows:

OrderCheck StartedDocumentPriority
112:05:00Standard document 1Standard
212:01:00Large documentLow
312:03:00Batch-checked documentsLow

At 12:07 the language server is finished with the previous tasks and starts to process the first standard document in the queue. A few seconds later, a new checking request is received for another standard document. However, the second standard document can’t go to the front of the queue because the large document has been at a low priority for more than 5 minutes, and is now reprioritized as a standard document.

The core server reorders the queue again as follows:

OrderCheck StartedDocumentPriority
112:01:00Large documentStandard

(Priority changed to "Standard" at 12:07:01)

212:07:05Standard document 2Standard
312:03:00Batch-checked documentsLow
This kind of scenario should be very rare in most installations. If your core server is regularly queuing checking requests for more than 5 minutes, you should consider other ways to optimize your processing capacity such as load balancing with multiple language servers.

You can change how the core server prioritizes documents by performing the following actions:

  • Configure the waiting times for low-priority checking requests.
  • Configure the large document threshold.

Configure Waiting Times for Low-priority Checking Requests

If a user sends a low-priority checking request when all language servers are busy, the user must wait a maximum of 5 minutes before their checking request is reprioritized. If the low-priority checking request is still in the queue after 5 minutes, the core server gives it a standard priority. You can change the maximum time to wait before the core server reprioritizes a low-priority checking request.

You might change maximum waiting time if you notice that users are waiting too long when checking large documents or running batch checks. You can also disable the waiting times so that the core server always processes checking requests in the order that they’re received.

To configure the maximum waiting time for low-priority checking requests, follow these steps:

  1. Open the coreserver.properties

    To edit coreserver.properties from the Dashboard, go to Maintenance > Configuration Properties, then follow the folder structure config > server > bin and click on the file coreserver.properties. You can then edit the properties directly from the Dashboard.

    Alternatively, you can edit coreserver.properties from the configuration directory: %ACROLINX_CONFIGURATION_ROOT%\server\bin\coreserver.properties

  2. Add the following properties:
    • languageServers.largeTaskWaitThreshold=<SECONDS>

      This property configures the waiting time for large documents.

    • languageServers.batchTaskWaitThreshold=<SECONDS>

      This property configures the waiting time for batch-checked documents.

    For example, to configure a new waiting time of 3 minutes for large documents add the line:

    Example:
    languageServers.largeTaskWaitThreshold=180

    To disable the waiting times, enter a value of 0 seconds:

    Example:
    languageServers.largeTaskWaitThreshold=0
    
    languageServers.batchTaskWaitThreshold=0
  3. Save your changes and restart the core server.

Configure the Large Document Threshold

If all language servers are busy, Acrolinx gives any document over 1 MB a low priority in the checking queue. You might change the large document threshold if you notice that some checks on documents under 1 MB are still causing unacceptable delays for users who check smaller documents.

To configure the large document threshold, follow these steps:

  1. Open your overlay of the core server properties file.

    To edit coreserver.properties from the Dashboard, go to Maintenance > Configuration Properties, then follow the folder structure config > server > bin and click on the file coreserver.properties. You can then edit the properties directly from the Dashboard.

    Alternatively, you can edit coreserver.properties from the configuration directory: %ACROLINX_CONFIGURATION_ROOT%\server\bin\coreserver.properties

  2. Add the following property:

    languageServers.largeTaskSizeThreshold=<SIZE_IN_KB>

    For example, to give documents over 500Kb a lower priority than documents under 500kb, add the line:

    Example:
    languageServers.largeTaskSizeThreshold=500
  3. Save your changes and restart the core server.

Configure the Check Request Queue Threshold

To avoid overloading the core server, there’s a limit to the number of checks that the core server can hold in the check request queue. The limit is for the sum of all checks, regardless of language or other attributes.

This limit is set to 100 check requests by default, but you can configure it if necessary.

To configure the check request queue threshold, follow these steps:

  1. Open your overlay of the core server properties file.

    To edit coreserver.properties from the Dashboard, go to Maintenance > Configuration Properties, then follow the folder structure config > server > bin and click on the file coreserver.properties. You can then edit the properties directly from the Dashboard.

    Alternatively, you can edit coreserver.properties from the configuration directory: %ACROLINX_CONFIGURATION_ROOT%\server\bin\coreserver.properties

  2. Add the following property:

    schedulerQueueLimit=<NUMBER_OF_CHECK_REQUESTS>

    For example, to limit the check request queue to 50 checks, add the line:

    Example:
    schedulerQueueLimit=50
  3. Save your changes and restart the core server.