在Azure函数应用中应在哪里设置ServicePointManager.DefaultConnectionLimit?

Mic*_*Daw 5 azure azure-functions

最新版本的Azure Functions工具(版本1.0.9)在启动时会产生以下警告:

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.
Run Code Online (Sandbox Code Playgroud)

提供的链接中的信息建议在Azure WebJob的Main方法中设置此值。但是,函数没有Main方法。在Azure Function应用程序中设置此值的最佳位置在哪里(特别是在使用消费计划时)?

Ale*_*nov 2

对于消费计划,它是 50,您无法更改它。

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

  • 我懂了。感谢您的链接。我不明白的是,如果您无法更改它,为什么提到的警告会添加到本地 Azure Functions cli 工具中? (5认同)