Skip to content

Commit 197e81c

Browse files
Merge pull request #225470 from ggailey777/errors
[Functions] Create diagnostic event article azfd0004
2 parents dd86ae7 + 948fff8 commit 197e81c

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

articles/azure-functions/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,8 @@
855855
href: errors-diagnostics/diagnostic-events/azfd0002.md
856856
- name: AZFD0003
857857
href: errors-diagnostics/diagnostic-events/azfd0003.md
858+
- name: AZFD0004
859+
href: errors-diagnostics/diagnostic-events/azfd0004.md
858860
- name: host.json 2.x reference
859861
href: functions-host-json.md
860862
- name: host.json 1.x reference
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
title: "AZFD0004: Host ID collision"
3+
titleSuffix: "Azure Functions"
4+
description: "AZFD0004: Host ID collision"
5+
author: madelinegordon
6+
ms.author: magordon
7+
ms.topic: troubleshooting
8+
ms.date: 01/28/2023
9+
---
10+
11+
# AZFD0004: Host ID collision
12+
13+
This event occurs when you have the same host ID assigned to multiple function apps or slots, which also share the same storage account.
14+
15+
| | Value |
16+
|-|-|
17+
| **Event ID** |AZFD0004|
18+
| **Category** |[Usage]|
19+
| **Severity** |Error|
20+
21+
## Event description
22+
23+
A host ID collision can occur when more than one function app or slot uses the same host ID while sharing a storage account. This condition usually occurs due to truncation of similar function app names when the host ID value is generated. For example, if you have multiple apps or slots with names longer than 32 characters and the first 32 characters are shared, both generated host ID values may be the same due to truncation.
24+
25+
You can also have the same collision when you explicitly set the same host ID value on multiple function apps that use the same storage account.
26+
27+
When multiple apps have the same host ID, the resulting collision can cause incorrect behaviors. For example, some triggers, like timer and Blob Storage, store tracking data by host ID. A host ID collision can result in incorrect behavior when the host can't differentiate between apps by host ID. When such a collision is detected, an error (hard failure) is logged and the host is shut down. Before version 4.x of the Functions runtime, a warning was logged, but the host wasn't shut down.
28+
29+
For more information, see [host ID considerations](../../storage-considerations.md#host-id-considerations).
30+
31+
## Options for addressing collisions:
32+
33+
- Connect each function app or slot in the collision to a different storage account by changing the [AzureWebJobsStorage](../../functions-app-settings.md#azurewebjobsstorage) application setting or slot setting.
34+
- Rename your function apps to a name that has fewer than 32 characters. When app names have fewer than 32 characters, unique host IDs can be generated for each app, which removes the collision.
35+
- Set explicit host ID values for your function apps or slots so they no longer conflict. For more information, see [host ID considerations](../../storage-considerations.md#host-id-considerations).
36+
37+
## When to suppress the event
38+
39+
This event shouldn't be suppressed.

0 commit comments

Comments
 (0)