Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Run-From-Package creates an invalid deployment #3088

Closed
flagbug opened this issue Dec 6, 2019 · 7 comments
Closed

Run-From-Package creates an invalid deployment #3088

flagbug opened this issue Dec 6, 2019 · 7 comments

Comments

@flagbug
Copy link

flagbug commented Dec 6, 2019

Since yesterday, after every deployment we make to our App Service, the application fails to start. We're using Run-From-Package as deployment method and are seeing the following error in the App Service event log:

Application '/LM/W3SVC/61535351/ROOT' with physical root 'D:\home\site\wwwroot\' failed to start process with commandline 'dotnet .\Alexandria.dll' with multiple retries. Failed to bind to port '7356'. First 30KB characters of captured stdout and stderr logs from multiple retries:
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'D:\home\site\wwwroot\Alexandria.dll'. An assertion failure has occurred. (Exception from HRESULT: 0x8007029C)
Process Id: 11020.
File Version: 13.0.19218.0. Description: IIS ASP.NET Core Module V2 Request Handler. Commit: 4a42afc5aea63750638e118560d43db04bd9ccc2

In this case, Alexandria.dll is our application entry-point. It's an ASP.NET Core 2.2 application.

Or deployment setup consists of the default production and a custom staging slot, with 2 App Service instances running at minimum. We're running theRun-From-Package deployment on the staging slot, with auto swap enabled, so the application can be deployed with zero downtime. This issue is impacting all of our customers after a deployment.

A simple restart of App Service fixes this issue.

After searching around a bit, the issue we're experiencing here seems to be very similar to Azure/app-service-announcements-discussions#32 (comment)

Basically two questions are open for me here:

  1. Why is App Service unable to load our .dll?
  2. Why would App Service auto-swap an application that isn't even able to start? That seems completely crazy to me and should be prevented by all kinds of health checks on the side of App Service.

Please let me know what useful information I can provide in addition.

@suwatch
Copy link
Member

suwatch commented Dec 6, 2019

Before we auto swap, we ensure 1) deployment successful 2) app is responsive and return 200 on root path access. It seems to contradict with your 2nd question. Best is for us to check the log and confirm. Do share the UTC time of the most recent deployment (auto-swap) as well as the webapp name (here or indirectly) that left your production in bad stage. We can investigate.

@flagbug
Copy link
Author

flagbug commented Dec 7, 2019

@suwatch WebApp name is mimo-api-production, happened the first time after deployemtn on Thursday ~15:15 UTC and then again after deployment on Friday ~09:45UTC

FYI, since then we've changed the deployment strategy back to WebDeploy where this problem doesn't occur, so you'll only see the staging slot having Run-From-Package enabled right now.

@suwatch
Copy link
Member

suwatch commented Dec 10, 2019

Thanks for the info .. we are taking a look and will update what we find.

@suwatch
Copy link
Member

suwatch commented Dec 10, 2019

@flagbug I was wrong on swap would happen if only 200. Swap will happen regardless of the status by default. However, recently we made an improvement to allow the app to specify condition (expected statuses) before swapping. Please checkout WEBSITE_SWAP_WARMUP_PING_STATUSES.

@flagbug
Copy link
Author

flagbug commented Jan 28, 2020

@suwatch Any update on the problem with the App Service being unable to load our .dll? We've switched back to WebDeploy for now, but this seems like a major flaw in the Run-From-Package, it means we can't trust the platform to deploy your application properly

@suwatch
Copy link
Member

suwatch commented Jan 28, 2020

Can you create and repro on one of your test site and share us that? Give info about what DLL was not loaded etc.

@jvano
Copy link
Member

jvano commented Apr 29, 2024

Hi

If the problem persists and is related to running it on Azure App Service, please open a support incident in Azure:
https://learn.microsoft.com/en-us/azure/azure-portal/supportability/how-to-create-azure-support-request

This way we can better track and assist you on this case

Thanks,

Joaquin Vano
Azure App Service

@jvano jvano closed this as completed Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants