Execution Timeout Expired - while running SQL stored procedure query

Hi @Allan_Zimmermann Good day,

My use case is to extract data from MS SQL database using stored procedure and write that data to Excel workbook.

My stored procedure will take approx 1 to 2mins to complete execution, but openrpa timeout by 30seconds. where can i increase query execution timeout time?

[Output] Database failed at 1.4 in 00:31.459

Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.


image

I had to check the code, and just saw that “timeout” on the scope is not being used anywhere.
But you can override it on scope in the connection string property by adding something like

;Connection Timeout=3600

i’s seconds, so 3600 is an hour
You could also set this on the ODBC link.

@Allan_Zimmermann no luck, still it’s giving timeout error in 31seconds

is there anything we can override query execution time?

I’m a little rusty on mssql, i havent worked with mssql since 2015.

So my reply was loosely based on something i found on stackoverflow, i can see both why, and why not connection timeout would be the right value to update. So lets assume that is not correct.

Then we can look for transaction timeout or Command Timeout
as far as i can see, CommandTimeout can only be set when doing the query ( so means i need to update the openrpa.database dll ) …
I will see if i can get around to that one of the next days, but until then, feel free to see if you can find a work around using connection string or setting the global maxTimeout

Sorry, i completely forgot about this.
I have update DatabaseScope to hide the timeout that is not used ( timeout is read only and can only be set using the connection string. I thought about keeping it and using it as a default timeout for all queries inside it, but decided to keep that for another day )
I have update ExecuteNonQuery, ExecuteQuery and ExecuteScalar with a timeout field, of type int, this sets the command timeout for that command.
You can download and test it, by downloading the latest pre-release on this page

It’s working now, Thank you Allan for the quick update!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.