Managing query workload

If your organization runs sophisticated or complex custom view queries, you might encounter issues with server performance. These kinds of queries consume a significant amount of memory and CPU time, which slows down the server. This heavy query load results in the queries taking longer to complete than the default duration. If you run several of these complex queries, or refresh queries that are already running, the system can get overloaded and stop responding. A system administrator can prevent these kinds of situations from happening by controlling and managing the query workload.

Before you begin

You must have administrator permission to view and modify server properties, and you must be in the DOORS® Next application.

About this task

Although you cannot cancel a running query, as an administrator, you can proactively manage the query load on the server. You can monitor the current query work volume, queue length, average execution time, and time spent waiting for the query to complete, and adjust the values for the query size and the thread pool size.

When view queries are submitted, they are added to the queue. When the queue reaches the defined maximum count, any additional queries are rejected, and a message is displayed that states that the server is busy and to try again later.

The system also prevents duplicate queries from being added to the queue. For example, if you resubmit a query because the first one is taking too long to complete, the request is ignored.

The following types of operations are queued and controlled by the server:
  • Running saved views
  • Sorting and filtering on the Artifacts page
  • Sorting and filtering on the Modules page
  • Running dashboard widget queries
  • Submitting requests to the OSLC query API
  • Accessing internal system paths that leverage "view service"; for example, exporting to CSV
You can perform the following operations when the queue is full:
  • Basic navigation on the Artifacts, Modules, and Collections pages
  • Basic (default) queries on the Modules and Collections pages
  • Creating, reading, and editing artifacts, including modules and collections
  • Participating in reviews
  • Creating, reading, and editing links, comments, folders, and tags

Procedure

  • To view statistics about the thread pool, complete the following steps:
    1. On the Administration menu , click Manage Server Administration.
    2. On the DOORS Next Application Administration page, click Debug.
    3. On the Statistics page, scroll down to the ThreadPools section and view the details for the ViewQueryThreadPool component.
  • To modify the size of the query queue and thread pool, complete the following steps:
    1. On the Administration menu , click Manage Server Administration.
    2. On the DOORS Next Application Administration page, click Application and, under Configuration, click Advanced Properties.
    3. On the Advanced Properties page, scroll to the DOORS Next Grid Views Component section.
    4. Click Edit and modify the current values for the query queue and the query thread pool.
      The default query queue is 10 times the size of the thread pool value. The default query thread pool size is 75% of the number of processors on the server, or a minimum of 4.
    5. To save the updated values, click Preview.