azure-functions-host: Running Azure Functions works locally but fails upon deployment with "1 functions found (Custom) 0 functions loaded"
I have an Azure Function that works locally. But when I deploy it to the cloud, it apparently doesn’t load and therefore doesn’t execute. The logs from the deployed code show: 1 functions found (Custom) 0 functions loaded
message. Here’s what’s happening in more detail:
My application is running on Python 3.9. When I run it locally using the Run and Debug
mode in VS Code, I can see it executes successfully in the terminal output.
Then I try deploying from VS Code to my Function App:
And the terminal output shows the deployment is successful:
Deployment successful. deployer = ms-azuretools-vscode deploymentPath = Functions App ZipDeploy. Extract zip. Remote build.
But when I go to the Function App in the Azure Portal, no functions are listed there:
And the log stream shows:
Connected!
2023-12-01T21:08:00Z [Verbose] Initiating background SyncTriggers operation
2023-12-01T21:08:00Z [Information] Loading functions metadata
2023-12-01T21:08:00Z [Information] Reading functions metadata (Custom)
2023-12-01T21:08:00Z [Information] 1 functions found (Custom)
2023-12-01T21:08:00Z [Information] 0 functions loaded
2023-12-01T21:08:00Z [Information] Loading functions metadata
2023-12-01T21:08:00Z [Information] Reading functions metadata (Custom)
2023-12-01T21:08:00Z [Information] 1 functions found (Custom)
2023-12-01T21:08:00Z [Information] 0 functions loaded
2023-12-01T21:10:31Z [Verbose] Received request to drain the host
2023-12-01T21:10:31Z [Information] DrainMode mode enabled
2023-12-01T21:10:31Z [Information] Calling StopAsync on the registered listeners
2023-12-01T21:10:31Z [Information] Call to StopAsync complete, registered listeners are now stopped
So it seems like the code is deploying but the Function App can’t load it for some reason.
Have looked around for a solution but no luck yet. I found this thread but it looks like that was specifically related to functions failing locally, whereas my function runs locally but not when deployed to the cloud. Hoping this thread can help me figure out my particular issue.
- Language and version: Python 3.9
- Function App runtime version: 4.27.5.5
- Region: East US
About this issue
- Original URL
- State: open
- Created 7 months ago
- Comments: 15 (1 by maintainers)
I am seeing the same issue, however my function in written in C# .NET 8 isolated worker. The message
A function allow list has been specified, excluding all but the following functions: [function name]
is is in the trace log, but the function is found, but not loadedwill check and update.Thanks for reporting.