Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What triggers Azure Functions to reload the referenced assemblies?

I've been referencing external assemblies trying to work around the issue noted here: Azure Function Cannot Load Portable Assembly. However, often my function does not seem to reflect the changes made to the functionName\bin assemblies. I've intentionally referenced the wrong assemblies, and then reran the function. I experience no change to what is logged (and I'm logging exceptions).

How do I force a complete reload of the Azure function? Can I somehow see what Azure functions has as its "loaded" assemblies?

like image 368
tillerstarr Avatar asked Jul 13 '16 16:07

tillerstarr


People also ask

What triggers Azure function?

An Azure Function Trigger is a part of a function's stack that tells Azure how the function is invoked. The most common function triggers are HTTP, Timer, and Blob: The HTTP trigger tells Azure that the function will be invoked through an HTTP request.

How do you trigger a function on Azure app?

On the new function, select the HTTP trigger Azure function template. Now in the next window, Provide a name for the HTTP triggered Azure Function and then choose the Authorization level as function and then click on the Create Function to create the HTTP triggered Azure function.

Can an Azure function have two triggers?

There are no plans to support multiple triggers per Function. You will have to create a Function for each EventHub. If there is common code that may be shared between Functions, you may move them to a helper method that can be called from each Function.

How do you trigger HTTP events in serverless?

HTTP Trigger Azure Functions has an API endpoint created for each Function App. This service allows you to define public HTTP endpoints for your serverless functions. To create HTTP endpoints as Event sources for your Azure Functions, use the Serverless Framework's easy HTTP Events syntax.


1 Answers

If the only thing changing is the implementation and not the assembly identity (name, version, etc.), you'd indeed see this behavior as an assembly with a matching identity would already be loaded and that would be used.

Restarting your Function App site (under Function app settings > Go to app service settings > Restart) should trigger a host restart, which will force all assemblies to be reloaded.

You can also Kill the non-scm w3wp.exe process using Kudu (https://yourappname.scm.azurewebsites.net), under Process Explorer, which will also force a host restart.

like image 53
Fabio Cavalcante Avatar answered Oct 05 '22 04:10

Fabio Cavalcante