Edit

Troubleshoot post-deployment function app runtime issues in Azure Functions

Summary

This article describes common causes of runtime issues and provides solutions to resolve these issues in Azure Functions.

If your Azure Functions experiences issues after deployment, determine whether the problem is related to deployment or runtime. A deployment issue can cause the wrong set of files to be deployed to your function app, or it can cause some files not to be deployed at all. A runtime issue occurs after deployment. The files in your wwwroot directory are exactly as they should be, but the function app isn't running correctly. When this scenario occurs, the technique that you used to deploy your site is no longer relevant. For a runtime issue, focus on what your code is doing at runtime and how it's failing.

Common causes for application runtime issues after content deployment

Runtime failure can occur for any of the following reasons:

  • The function runtime can't start because the function app lost access to the storage account.
  • In the runtime sandbox environment of Azure Functions, something blocks certain operations that work on your local computer.
  • Your Azure Functions app isn't configured correctly. For example, the function host doesn't start up because of incorrect values in the following settings:
    • Runtime or language version
    • Triggers connection strings
    • Key vault settings
  • An external dependency (such as a database or messaging system) isn't set up correctly and causes timeout errors.
  • Sync triggers failed. This condition causes an incorrect loading of functions.
  • Your code makes invalid assumptions about paths, such as hard-coding a path that exists only on your local computer.

Solutions

To fix runtime issues after the content deployment, try one or more of the following methods: