Skip to main content
Gainsight Inc.

Troubleshoot Timeout Errors in Rules

Gainsight NXT

 

This article explains how to troubleshoot the Timeout errors in Rules Engine.

Overview

When you execute a rule, sometimes the rule Status can be In progress for a long period of time.This Status indicates that the rule is being executed. However, when this Status persists for a long time, it is known as Timeout error. This article explains why Timeout errors occur in rules and how you can avoid them. 

Rule Timeout Reasons

 A rule times out because the amount of data referenced is more than what the system can process. This can happen in multiple scenarios:

  • The object the rule is based on contains a massive amount of data, resource utilization within your Gainsight instance is hitting its limit.
  • The rule query is not specific enough.

1. RE.png

Prevent Timeout Errors

This section explains how you can prevent the Timeout errors. 

  • Use Filters Accurately: Adding filters is a great way to make the query of the rule more selective, and to narrow down the amount of data the rule needs to access.

    • The order of the filters in the rule will determine the order of how they are applied in the data query.
    • Any date filters should be added first. Narrowing down the date range, before the rule acts on other filters in the query, is the most organized way for it to pull information, and will reduce the chance of the rule timing out. Below is an example of how to correctly order filters to prevent timeout errors. Note that the date filter is placed first in the Setup Rule section.

Troubleshoot Timeout.jpg

  • Split the rule if possible: If a single rule continues to timeout, sometimes multiple rules are the answer.

    • The best way to accomplish this is to copy the rule with the exact same query, but then modify the filters so only a section of the data referenced is being handled by each rule.
    • For example, you could have each rule only handle part of a date range referenced (remember to add this filter first); but you could also divide the rules by many of the other identifiers used within your original query.
    • These rules could then be scheduled to run sequentially. To learn more about this, refer to the Schedule and Execute Rules article and the Rules Chain article.
  • Use only the Required Fields in the Show Section: While configuring a rule, any field added to the “Show” section will be referenced when the rule performs its query. When attempting to resolve a timeout issue with a rule, you want to do everything possible to simplify this query. For this reason, you should only add fields to this section that are absolutely necessary for the rule to complete its function. All other fields should be removed.
  • Index SFDC fields used by the rule filters: Indexing is the standard way to make sure the information within a database is organized properly and that the data can be accessed in a timely manner. You will likely need assistance from a Salesforce representative in order to complete this step.