tmaj
tmaj

Reputation: 34987

Azure Function works but reports "409 The specified container already exists"

In my Azure Function which doesn't have any Azure Storage code I'm getting the following warning in Application Insights.

Error response [15fd74...ec3601] 409 The specified container already exists. (00.0s)
Server:Windows-Azure-Blob/1.0,Microsoft-HTTPAPI/2.0
x-ms-request-id:b72b1...f5-26564f000000
x-ms-client-request-id:15fd74...0ec3601
x-ms-version:2020-08-04
x-ms-error-code:ContainerAlreadyExists
Date:Mon, 21 Feb 2022 07:33:56 GMT
Content-Length:230
Content-Type:application/xml

I think it's reasonable to assume this is something to do with the storage account that the Azure Functions use to record their state etc.

SDK version azurefunctions: 4.1.3.17473

Is there a way to debug and/or resolve the issue?

Upvotes: 11

Views: 9189

Answers (1)

Stephen Geraghty
Stephen Geraghty

Reputation: 121

It's apparently a bug in the functions SDK. If you add "Azure.Core": "Error" to the logLevel setting in the host.json file, then you will suppress it.

{
  "version": "2.0",
    "logging": {
      "applicationInsights": {
        "samplingSettings": {
          "isEnabled": true,
          "excludedTypes": "Request"
        }
      },
      "logLevel": {
        "default": "Warning",
        "Custom": "Information",
        "Function": "Information", // dependency telemetry, used to analyzing dependencies and their performance
        "Host.Results": "Information", // request telemetry, used for analyzing execution performance
        "Azure.Core": "Error" // suppressing sdk blob warnings 
      }
    }
}

Upvotes: 12

Related Questions