-
Notifications
You must be signed in to change notification settings - Fork 441
Host IDs
The Functions Host uses a Host ID to uniquely identify a particular Function App. By default, the ID is auto-generated from the Function App name, by taking the first 32 characters. In advanced scenarios, the ID can also be specified manually via App Settings (see below). This ID is used by the system to correlate and store per-app information in storage.
If you have multiple Function Apps sharing a single storage account and they're each using the same Host ID, that can result in a Host ID collision. The HostID is used by the platform to store per-app correlated control/tracking information in the storage account. When multiple apps are using the same HostID (a collision), this can result incorrect behaviors. For example, some triggers like TimerTrigger/BlobTrigger store tracking info by HostID and can behave incorrectly when multiple apps use the same ID.
Options for addressing this error:
- Point your app at a different storage account.
- Rename your app so something less than 32 characters in length. This will change the computed HostID for the app and remove the collision.
- Add an app setting AzureFunctionsWebHost:hostId to your app to override the computed HostID with the one you specify.
- You can disable this error via the
FUNCTIONS_HOSTID_CHECK_LEVEL
app setting. Only do this if none of the options above are possible for you. Possible values for this setting are "Warning" and "Error".
Keep in mind that pointing an existing app to a new storage account, or changing the HostID or name of the function app can impact function processing. For example, BlobTrigger tracks whether it's processed individual blobs by writing "receipts" under a HostID path in storage. If the HostID changes or you point to a new storage account, that can lead to blobs being reprocessed. For a new app that hasn't processed work yet, this won't be a problem.
You can specify an explicit Host ID for your app via app settings:
-
AzureFunctionsWebHost__hostId
(Windows and Linux) -
AzureFunctionsWebHost:hostId
(Windows only)
The value for the ID must be are under 32 characters in length. Other restrictions the value must satisfy are here. An easy way to generate an ID would be to take a GUID, remove the dashes and make it lower case, e.g. 1835D7B5-5C98-4790-815D-072CC94C6F71 => 1835d7b55c984790815d072cc94c6f71
- Configuration Settings
- function.json
- host.json
- host.json (v2)
- Http Functions
- Function Runtime Versioning
- Official Functions developers guide
- Host Health Monitor
- Managing Connections
- Renaming a Function
- Retrieving information about the currently running function
- Site Extension Resolution
- Linux Consumption Regions
- Using LinuxFxVersion for Linux Function apps
- Out-of-proc Cancellation Tokens
- Assembly Resolution in Azure Functions
- ILogger
- Precompiled functions
- Official Functions C# developer reference
- Contributor Onboarding
- Development Process
- Deploying the Functions runtime as a private site extension
- Authoring & Testing Language Extensions
- Bindings in out-of-proc
- Language Extensibility
- Worker Capabilities
- Investigating and reporting issues with timer triggered functions not firing
- Sharing Your Function App name privately
- Azure Functions CLI release notes [moved here]
- Function App Zipped Deployment [deprecated]