Azure function not running successfully.

Ananth Asamani 1 Reputation point

Hi all,

I'm trying to run a azure function (1.x version) on azure cloud, and I'm getting the below error.

Microsoft.Azure.WebJobs.Host: Timeout value of 00:05:00 was exceeded by function: 'MY_FUNCTION_NAME.'

  • For the above error, I have raised the timeout value from default (5 min) to 10 min in the host.json file as below
  • { "functionTimeout": "00:10:00" }

[Error] The listener for function 'MY_FUNCTION_NAME.' was unable to start. mscorlib: One or more errors occurred. A task was canceled.

  • I'm unaware of how to handle the above error.

When I run it locally using visual studio 2017, it runs smoothly. I get the above listed 2 errors on Azure only.

I'm running the function on consumption plan, with 2 functions, 1 as timer trigger and the other as http trigger.
Http trigger function is running as expected.

One another question is, how to know if the timer trigger is fired at specified time, my CRON expression looks as "0 0 0 * * *"

I have literally eaten up almost a week as of today to resolve the issue. I highly appreciate if someone can help me in resolving my issue.

Thank you.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,383 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Andriy Bilous 10,996 Reputation points MVP

    Hello @Ananth Asamani
    Here is a cheat sheet for Azure Function Cron Expresion

    Notice there are six placeholders; but in your scenario I see only four "0 0 0 *".

    You are correct Azure Function (1.x version) default timeout is 5 minutes and you can increase it to 10 minutes.

  2. MayankBargali-MSFT 69,581 Reputation points

    Hi @Ananth Asamani

    As per the initial analysis, I can see below errors in the function app

    Issue 1: Function Site Name is over 32 Characters long.

    • Please modify the function site name to less than 32 characters.

    More Information:

    Issue 2: The function app does not contain any active triggers.


    • Ensure to exclude comments in host.json. Comments are not valid in JSON, and you should exclude them in your actual host.json .

    • If you are finding your triggers has been configured properly, you might need to sync triggers manually. You can synchronize triggers with either of the following ways:

    • Go to Azure Portal and click the refresh button next to your Function App.
    • Make an API call to the sync triggers endpoint. Please refer to this Powershell sample.

    More Information:

    Once the trigger was active we see a timeout error and the recommendation is to navigate to App Service Diagnostics to configure appsettings correctly and then verify which piece of your code is taking more time to execute causing the timeout issue.

    0 comments No comments