(SQL Error Number -2146232060, -2, 0). The wait operation timed out

alex
New Contributor II

Hi, we received the following error message in OneStream on some of our scheduled data management tasks; these tasks load workflows by pulling data from an Azure system.

"Summary: Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
Operation cancelled by user. (SQL Error Number -2146232060, -2, 0). The wait operation timed out"

My understanding is that the this indicates that OneStream cancelled the operation (and failed the task) as Azure took too long to respond. 

How would I go about preventing this issue for the future? 

1 ACCEPTED SOLUTION

JackLacava
Community Manager
Community Manager

That sounds like a Connector rule executing SQL queries. One thing you can do, is to use the "large timeout" option, which will make OneStream more tolerant of slow queries. The timeouts (both small and large) are set up in the connection properties found in the application server configuration file (assuming you're using a named connection, which is what most people do) - if you are a Cloud customer, talk to Support about it.

Other things to consider:

  • use SQL Parameters to speed up repeated queries
  • increase your DTU settings (again in the connection properties)
  • add/improve indexes in your source database, to speed up the query
  • add/improve your queries
  • write code that retries a failed query after a short wait, trying to leverage database caching.

Hope that helps.

View solution in original post

1 REPLY 1

JackLacava
Community Manager
Community Manager

That sounds like a Connector rule executing SQL queries. One thing you can do, is to use the "large timeout" option, which will make OneStream more tolerant of slow queries. The timeouts (both small and large) are set up in the connection properties found in the application server configuration file (assuming you're using a named connection, which is what most people do) - if you are a Cloud customer, talk to Support about it.

Other things to consider:

  • use SQL Parameters to speed up repeated queries
  • increase your DTU settings (again in the connection properties)
  • add/improve indexes in your source database, to speed up the query
  • add/improve your queries
  • write code that retries a failed query after a short wait, trying to leverage database caching.

Hope that helps.