@Szymon Thanks for the details. As you are not using cosmos DB input/output binding and using Cosmos DB client library then you need to leverage the lazy pattern as documented here. Please refer to manage connection document and for cosmos DB client
Azure FunctionApp - Only one usage of each socket address (protocol/network address/port) is normally permitted.
Szymon
25
Reputation points
Hello, im receiving error:
2023-02-01T09:05:53.248 [Error] Executed 'myFunctionName' (Failed, Id=df08ed2f-fa3d-4d75-a50c-6d108707bce2, Duration=1042ms)Only one usage of each socket address (protocol/network address/port) is normally permitted.
Following answers from search engine this means port exhaustion, but there are following problems in my case:
- it was working fine up to today morning;
- traffic is very low, in example i run this function once, then second time, then third and i get error;
- i do not open ANY http connections inside.
Whole function body below (removed namespaces from snippet as these are business classes which names i do not want to share):
using System.IO;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Azure.WebJobs;
using Microsoft.Azure.WebJobs.Extensions.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Logging;
namespace DummyPublishers
{
[System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
public static class DummyStandardRolePublisher
{
[FunctionName("DummyPublisher")]
public static async Task