I’ve created a basic timer_trigger Azure Function using Visual Studio Code using Python. It works perfectly in my local environment. However, after deploying it to Azure, the function does not run at all.
When I try to test or run the function through the Azure Portal, I receive the following error message:
Function triggers synchronization failed due to Response status code does not indicate success: 500 (Internal Server Error)
The deployment itself completes without any issues, and the function appears in the portal, but the trigger doesn’t execute automatically or manually, I tried using HTTP function as well but same results.
(I am not using pay as you go, using free 200$ credit subscription plan) Has anyone encountered this issue before or know what could be causing this error?
Any help or guidance would be greatly appreciated!
Thank you. Error it shows
Output:
:23:54 AM func-afaq: Uploaded package to storage blob. Deployment is partially successful from here.
2:23:54 AM func-afaq: [RemoveWorkersStep] starting.
2:23:55 AM func-afaq: RemoveAllWorkers, statusCode = NoContent
2:23:55 AM func-afaq: Reset all workers was successful.
2:23:55 AM func-afaq: [SyncTriggerStep] starting.
2:23:55 AM func-afaq: Waiting 60 seconds for the workers to recycle with deployed content.
2:24:55 AM func-afaq: [CleanUpStep] starting.
2:24:55 AM func-afaq: Cleaned the source packages directory.
2:24:55 AM func-afaq: Cleaned the result artifact directory.
2:24:55 AM func-afaq: Finished deployment pipeline.
2:24:57 AM func-afaq: FunctionHostSyncTrigger, statusCode = InternalServerError
2:25:02 AM func-afaq: Querying triggers...
function_app.py:
import logging
import azure.functions as func
app = func.FunctionApp()
@app.timer_trigger(schedule="0 * * * * *", arg_name="myTimer", run_on_startup=False,
use_monitor=False)
def timer_trigger(myTimer: func.TimerRequest) -> None:
if myTimer.past_due:
logging.info('The timer is past due!')
logging.info('Python timer trigger function executed.')
host.json:
{
"version": "2.0",
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true,
"excludedTypes": "Request"
}
}
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[4.*, 5.0.0)"
}
}
local.setting.json:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "python",
"AzureWebJobsFeatureFlags": "EnableWorkerIndexing"
}
}
I tried deploying a simple template given by vs code when i created function it ran locally with no issues, then after deployment it gave me : Error while loading Ask questions and use troubleshooting tools to investigate these errors.Diagnose and solve problems Encountered an error (InternalServerError) from host runtime


