An error occurred while retrieving the data - Random errors for multiple query entity expressions

Certified Lead Developer

Hi All,

I am aware that this error occurs when the time taken to fetch the data exceeds the threshold. We get these errors randomly for multiple expressions which use query entity on different tables/views but not frequently. I am afraid it may become worse when data present in DB increases in terms of rows.

Can you please suggest some of the best options to mitigate this risk or avoid these errors, at Appian end, DB end or Server end?

Thanks.

  Discussion posts and replies are publicly visible

  • Hi hiteshd, can you confirm if you are utilizing paging when returning these data sets?  Note this error is commonly received in 2 scenarios - the size of the data set being returned is too high (> 1 MB), or the amount of time to return the query is too long (> 10 seconds).  Also note the fetchTotalCount=true parameter setting can also affect your response time negatively. 

    To solve the data size issue, a paging or batching approach is always recommended. If a timeout is occurring, this typically involves reviewing underlying view/table structure for performance tuning, potentially adding indexing, etc.

    If you can share additional details on any specific queryEntity situation that commonly fails, that would help our recommendations.