I have an azure function where I am getting failure rate like below.
Host thresholds exceeded: [Connections]. For more information, see https://aka.ms/functions-thresholds.
On my initial finding I found below link https://aka.ms/functions-thresholds
As per above link I found problem is because of Number of outbound connections
On my further search this could be possible because of three reasons as per below link
https://learn.microsoft.com/en-us/azure/azure-functions/manage-connections
Now Since I am not using any Http Client and DocumentClient so I am sure there is something wrong with SQL connection as my Azure function calling some class libraries internally and all these libraries work with SQL.
Now as per the below documentation I am highly confused like what to in case of optimizing this.
Some data frameworks, such as Entity Framework, typically get connection strings from the ConnectionStrings section of a configuration file. In this case, you must explicitly add SQL database connection strings to the Connection strings collection of your function app settings and in the local.settings.json file in your local project. If you are creating a SqlConnection in your function code, you should store the connection string value in Application settings with your other connections.
In first paragraph it is saying store SQL connection string under Application settings - > Connection strings collection.
In second paragraph its saying store SQL connection string under Application setting so does my question is - Does it means like Application settings - > Application settings collection.
Since all libraries which I am calling are getting connection string from configuration file with
So If I store SQL connection string under app setting then I have to change the calling style based on below setting
Can any body elaborate more where exactly store SQL connection string under the Function App setting ?
Also is there any way to use avoid below error ?
Host thresholds exceeded: [Connections]. For more information, see https://aka.ms/functions-thresholds. Problem Id:System.InvalidOperationException at Microsoft.Azure.WebJobs.Script.ScriptHostManager.IsHostHealthy