Azure Functions randomly stop working

Petri Leinonen 0 Reputation points
2023-05-05T06:20:22.9+00:00

Hello,

I am having a strange problem with Azure Functions. Sometimes they just stop working - and I am not making any code changes while this happens. The functions just start to give following error messages:

  • "The service is unavailable" or
  • "Backend call failure".

After some time the function just starts to work normally. The function doesn't do anything with databases - it simply responds a hard coded message: "OK", when it's working.

Also when I view my Overview-page in Azure Portal - I am getting this error message: "Resource not found" in every box that shows statistics of Request, Data out, Functions hits and Function errors.

I have had this problem for well over 6 months. Sometimes it happends daily and sometimes it works for longer periods of time.

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

1 answer

Sort by: Most helpful
  1. VasimTamboli 5,215 Reputation points
    2023-05-06T18:53:54.3533333+00:00

    There could be multiple reasons why Azure Functions randomly stop working. Here are some steps that you can try to troubleshoot the issue:

    Check the logs: Check the logs for your Azure Function in the Azure Portal or using the Azure Functions Core Tools. This can give you an idea of what went wrong and where to look for a solution.

    Review the code: Review the code for your Azure Function and ensure that it is correct and does not contain any errors. Consider adding exception handling and logging to your code to help identify any issues.

    Check resource usage: Check the resource usage for your Azure Function, including memory usage and CPU usage. If your function is consuming too many resources, it may be terminated by Azure.

    Check network connectivity: Check the network connectivity for your Azure Function. Ensure that your function can communicate with any external services it requires.

    Consider scaling: Consider scaling your Azure Function horizontally by adding additional instances. This can help ensure that your function can handle increased traffic.

    Contact support: If the issue persists, contact Azure support for assistance.

    It's worth noting that Azure Functions are designed to be stateless, which means they don't retain any state between invocations. If your function relies on external resources, such as a database or file system, ensure that your function can handle any failures or errors that may occur.

    0 comments No comments

Your answer

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