Michael Daw
Michael Daw

Reputation: 250

Where should ServicePointManager.DefaultConnectionLimit be set in an Azure Function app?

The latest release of the Azure Functions tooling (version 1.0.9) generates the following warning at startup:

ServicePointManager.DefaultConnectionLimit is set to the default value of 2. 
This can limit the connection throughput to services like Azure Storage. For 
more information, see https://aka.ms/webjobs-connections.

The information in the provided link suggests setting this value in the Main method of an Azure WebJob. However, Functions don't have a Main method. Where is the best place to set this value in an Azure Function App (particularly when using a Consumption plan)?

Upvotes: 5

Views: 2934

Answers (1)

Alexey Rodionov
Alexey Rodionov

Reputation: 1446

For consumption plan it's 50 and you can't change it.

https://github.com/Azure/azure-functions-host/blob/v1.x/src/WebJobs.Script/ScriptConstants.cs#L84

Upvotes: 2

Related Questions