Azure function doesn't work all the time

RTAYLI Oumaima 10 Reputation points
2023-02-15T10:45:20.87+00:00

When I test my azure function locally, it triggers but not all the time and without chaging anything in the code.

Sometimes it works sometimes it doesn't for no obvious reason.

The img bellow shows the state of the azure function. It get triggered but doesn't compile the code.

Thanks.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 36,951 Reputation points MVP Volunteer Moderator
    2023-02-15T23:19:03.72+00:00

    Hello @RTAYLI Oumaima ,

    This is strange behavior.

    My first feeling is that the Azure Function fails and exits with an uncaught exception. This can have a bad influence on logging too.

    Have you enabled Application Insights? This gives a live stream of what is happening within your Azure Functions (execution times, exceptions, logs, etc.).

    Please enable it here:

    User's image

    There, a button is offered:

    Application Insights is not free, there is logic executed and data is stored. But it is essential for live insights about what is happening.

    Meanwhile, put a try-catch on the highest level in your code...


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.