Hello Kristian,
Perhaps I missed it but I did not see in your post or PDF what you meant by not working. Do you mean that the 400 second override is not having an effect and the query is still timing out after 30 seconds right?
The MS SQLClient SQLCommand docs (
https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlcommand.commandtimeout?view=dotnet-plat-ext-3.1 ) had a couple of possible causes of this.
I also found quite a few articles about connection timeout where the SMEs were recommending setting the timeout values in the connection string. Could you perhaps share the non-private parts of your connection string here as well for analysis?
Lastly, this is not directly towards the issue but I would recommend paging these requests (as did several of the threads I read on timeouts.) Unless we are 100% sure of the volume of data, whatever static value we use today may not account for future behavior or an environment that is not performing optimally. Paging/chunking these queries and processing them incrementally will likely provide extra resiliency and help manage these timeout issues. To that end, we've made similar recommendation to customers that needed to add something like 400K items in a single "Add to Queue" action that was timing out.
------------------------------
Wing Ling Leung
Senior Product Consultant
Blue Prism Professional Services
------------------------------