Set an execution timeout

Queries that run on complicated or large amounts of data may be slower than expected. Usually, the best approach is to paginate the results. In cases where the complexity or amount of data is unknown, a timeout can break up the execution. The Output Module can timeout, not only on the execution logic level, but also break running database queries to protect the database load from stress.

You can set a timeout for each ViewConfig and TableViewConfig execution on the main config level. Defining it in the body of the query is optional.

If a timeout is not set in the ViewConfig or TableViewConfig, then a default value is added. You can configure the default value in the Collibra console, the default setting is eight hours. 

  • No single query may run longer than 24 hours, which is the maximum value.
  • Pagination is recommended for queries that may run longer. 
  • Those values will significantly smaller in the next major release, so it would be prudent to think about pagination.
  • If the queryTimeout is more than 24 hours, the system will overwrite it with the maximum 24-hour limit value.
  • Important exceptions are the {{domain}}/rest/2.0/outputModule/export/{{csv | excel}}-job endpoints. Here, data is calculated in chunks, with the size of the chunk defined in the Collibra Console. A separate query calculates each chunk and the timeout value set in the TableViewConfig will be a timeout value calculation for that chunk. 
JSON key Minimum value Default value Maximum value Description
queryTimeout 1 minute 8 hours (configurable) 24 hours

Timeout in number of seconds that computation of the output can last. No decimal point allowed. Negative values are invalid. Zero means no timeout. Positive values will stop execution and return an error if the execution takes longer than the given number of seconds.

Example of ViewConfig with a timeout set:

{
  "ViewConfig": {
    "queryTimeout": 5,
    "Resources": {
      "Domain": {
        "name": "d",
        "Name": {
          "name": "vocName"
        },
        "Asset": {
          "name": "t",
          "Signifier": {
            "name": "assetName"
          },
          "AssetType": {
            "name": "tt",
            "Name": {
              "name": "assetType"
            }
          }
        }
      }
    }
  }
}
---
ViewConfig:
  queryTimeout: 5
  Resources:
    Domain:
      name: "d"
      Name:
        name: "vocName"
      Asset:
        name: "t"
        Signifier:
          name: "assetName"
        AssetType:
          name: "tt"
          Name:
            name: "assetType"

After the timeout is reached, the REST request will receive a response with HTTP error code 408. Instead of a results message, the body will contain a JSON with the error description.