13

My Azure Functions were running fine and all of a sudden I am getting several "Assembly changes detected. Restarting host..." messages that is preventing my functions from completing.

Logs

I am not deploying new code so not sure what is triggering the Assembly Change event to fire. I was running on the latest version of the runtime and have since reverted to version 1.0.10947 thinking that maybe the underlying runtime was updated, but I'm still getting that line showing up in the logs.

Update Now that @Alexey has helped me track down what is causing the Assembly changes to be detected. I would like to ask if anyone can tell me WHY an assembly change is being detected even-tough I have not changed/redeployed my application.

Andy T
  • 10,223
  • 5
  • 53
  • 95
  • 1. Can you please share your function app/function name so we can investigate in the logs? https://github.com/Azure/azure-webjobs-sdk-script/wiki/Sharing-Your-Function-App-name-privately 2. Whether his function is saving any files (dll or exe) to the disk? Restart action should not be performed during function execution and actually host restarted only once according small intervals between log records (there is a bug in logging). – Alexey Rodionov May 24 '17 at 00:17
  • Are you saying this repros in different function apps? Are you using CI/CD? Performing any deployments? Would it be ok to inspect your app (and code)? – Fabio Cavalcante May 26 '17 at 06:09
  • Hi @FabioCavalcante We have deployed our FunctionApp code into different FunctionApps in different resource groups using Visual Studio and are also experiencing the same behavior. Yes, you can inspect the app and code. – Andy T May 26 '17 at 20:54

3 Answers3

6

After looking in your logs we opened an issue https://github.com/Azure/azure-webjobs-sdk-script/issues/1533#issuecomment-303595960.

Your functions had multiple restores but now issue is gone. Restores could be initiated by changing project.json.

Alexey Rodionov
  • 1,436
  • 6
  • 8
  • Any idea what would cause the restore to initiate if we are not changing the project.json when the restarts are happening? – Andy T May 24 '17 at 15:20
1

If you are stuck with the multiple

Assembly changes detected. Restarting host

I fixed my issue by deleted the log file in the Kudu services:

https://[FunctionAppName].scm.azurewebsites.net/

and follow on the top menu:

Debug Console >> powerShell

And the file log is :

LogFiles >> Application >> Functions >> function >> [Function name]

You can remove the log file.

Jean-philippe Emond
  • 1,619
  • 2
  • 17
  • 29
0

my 2c.

I was struggling with this issue for ages and not sure what was causing it. I believe I may have the answer.

Our solution has been toying with consumption plans, but pulled back to full App Service Plans because the initiation times were too long for our rather unique usage patterns.

But 2 of the appsetting params were still in place: WEBSITE_CONTENTSHARE And WEBSITE_CONTENTAZUREFILECONNECTIONSTRING.

per: https://learn.microsoft.com/en-us/azure/azure-functions/functions-app-settings#websitecontentazurefileconnectionstring these are ONLY for consumption plans.

I removed them and... touch wood, the issue seems to be resolved.