Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logic App Standard - Sql Server Timeout #460

Closed
mikeholdorf opened this issue Jan 26, 2022 · 10 comments
Closed

Logic App Standard - Sql Server Timeout #460

mikeholdorf opened this issue Jan 26, 2022 · 10 comments

Comments

@mikeholdorf
Copy link

mikeholdorf commented Jan 26, 2022

We have a simple Logic App that picks up a message from Service Bus and then calls to Sql Server. The query to SQL can take up to 2 minutes, but the timeout for this connector is 30 seconds. The documents show that we can use the setting: Runtime.ServiceProviders.Sql.QueryExecutionTimeout, but this has no impact at all.

How can we get a SQL Query to not timeout at 30 seconds?

Also, running under Node 12, this returns back a 502 Bad Gateway message. If you change to run under Node 14, it will return a 200 with an empty result set. This looks like it is a bug (or we shouldn't use Node 14).

AB#27002629

@AbodeSaafan
Copy link
Contributor

Hello, for setting the time out can you please confirm to add the appsetting "ServiceProviders.Sql.QueryTimeout" to your workflow app settings (local.settings.json for VSCode and appsettings on portal) with the timespan value that you want. The default for the action is 2 minutes (30 seconds was a bug that was fixed)

As for the node question, we only support node 12 at this moment

@mikeholdorf
Copy link
Author

We do not have anything in our local.settings.json specified.

I just ran a few tests and it looks like it does now timeout just over 2 minutes. So if this was a bug, it is now fixed. I still have 50 seconds in my hosts.json and I even added this as a configuration setting, but it doesn't seem to have any impact on how long the query runs and times out. Does this need to be a Configuration setting when running in Azure or is the host.json the only place this is needed?

Thanks

@AbodeSaafan
Copy link
Contributor

It should be a Configuration setting when running in the portal and when running locally it should be in local.settings.json.

The setting to set is "ServiceProviders.Sql.QueryTimeout" and the value is a timespan so for example "00:05:00" would be 5 minutes. Updating this setting on portal should trigger the app to restart and then the setting would take affect. Let me know if that works for you

@mikeholdorf
Copy link
Author

So this is now working. I added ServiceProviders.Sql.QueryTimeout as a configuration entry. I did use 00:01:00 and it times out in 1 minute. I then changed this to 00:01:30 and it timed out in 90 seconds.

The Documentation has this setting as Runtime.ServiceProviders.Sql.QueryTimeout. I guess we don't need the Runtime prefix.

@AbodeSaafan
Copy link
Contributor

Sounds good, I have noted that we need a documentation update and filed that on our team to update it.

@SaleemEcolab
Copy link

i added ServiceProviders.Sql.QueryTimeout in both host file and configuration ,but its not working as it takes default timeout as 2 mins

@SaleemEcolab
Copy link

Here is the code {
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle.Workflows",
"version": "[1.*, 2.0.0)"
},
"extensions":{
"workflow":{
"settings":{
"ServiceProviders.Sql.QueryTimeout":"00:05:00"

}
}
}
}

@SaleemEcolab
Copy link

@AbodeSaafan AbodeSaafan any idea on this ?

@mikeholdorf
Copy link
Author

I just did a test using a new Logic App Standard instance and used ServiceProviders.Sql.QueryTimeout in the Configuration with a value of 00:03:00. I put a huge delay in a SQL stored procedure and it timed out at 16 minutes. Make sure your connection string doesn't have a connection timeout specified...the default is usually 30 seconds

@AzureDev0012
Copy link

AzureDev0012 commented Aug 30, 2024

@mikeholdorf
I configured the SQL Query Execute Action in Logic App Workflow and added the "ServiceProviders.Sql.QueryTimeout" :"00:03:00" in Configuration, but no luck on Timeout increase.
And I have used managed identity for SQL Connection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants