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. 

Warning 
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.