Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApplicationInitialization not executing when using InProcess #8057

Closed
cannehag opened this issue Mar 1, 2019 · 9 comments
Closed

ApplicationInitialization not executing when using InProcess #8057

cannehag opened this issue Mar 1, 2019 · 9 comments
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions feature-iis Includes: IIS, ANCM investigate Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue.

Comments

@cannehag
Copy link

cannehag commented Mar 1, 2019

We have been using Application Initialization in our services to warm up the application before swapping slots (Azure App Services). We are using AppInsights for logging and have seen there initialization requests beeing logged with User-Agent "IIS Application Initialization Warmup".
When switching to InProcess hosting, these logs are missing.

<system.webServer>
      <applicationInitialization doAppInitAfterRestart="true" skipManagedModules="true">
         <add initializationPage="/api/heartbeat?checkDependencies=true" />
      </applicationInitialization>
</system.webServer>

Regardless of InProcess or not, Application Initialization should be executed.

@muratg muratg added feature-iis Includes: IIS, ANCM area-servers labels Mar 1, 2019
@cannehag
Copy link
Author

cannehag commented Mar 4, 2019

@muratg Any update on this? This is kind of serious since when using swapping in Azure, it will swap over to the production slot before the application is completely initialized.

@muratg
Copy link
Contributor

muratg commented Mar 4, 2019

@pakrym @jkotalik any thoughts here? Is this due to how logs are processed, or are we actually skipping this in InProc?

@pakrym
Copy link
Contributor

pakrym commented Mar 4, 2019

We had a fix for AppInit in 3.0 #7024 which might help this.

@pakrym
Copy link
Contributor

pakrym commented Mar 4, 2019

@cannehag are you able to try 3.0 preview using the site extension as described in https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/azure-apps/?view=aspnetcore-2.2#deploy-aspnet-core-preview-release-to-azure-app-service

@cannehag
Copy link
Author

cannehag commented Mar 5, 2019

@pakrym Just tested and I can't really see it working. There is a request with User-Agent "SiteWarmup" executing. This is the build-in warmup targeting the root of the site. The applicationInitialization from web.config (which uses User-Agent "IIS Application Initialization Warmup") still doesn't run according to my logs.

How I tested:

  • Creating a deployment slot
  • Installed "ASP.NET Core 3.0 (x64) Runtime" extension on the slot
  • Restarted slot
  • Deployed application (with AppInit in web.config) and InProc hosting
  • Swapped slots
  • Verified in AppInsights that no "IIS Application Initialization Warmup" entries was found

@analogrelay
Copy link
Contributor

@cannehag Can you try a self-contained deployment of 3.0? Also, I might suggest checking and logging the user agent in the app itself, rather than using App Insights, just to make sure you know if it's coming in. We have tests that seem to indicate this is working, so I want to make sure we know for sure what could be different in your environment :).

@analogrelay analogrelay added Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue. waiting and removed triage-review labels Jun 18, 2019
@analogrelay
Copy link
Contributor

Closing this as we haven't heard from you and generally close issues with no response after some time. Please feel free to comment if you're able to get the information we're looking for and we can reopen the issue to investigate further!

@pseabury
Copy link

pseabury commented Sep 5, 2019

I'd like this reopened if possible per https://stackoverflow.com/questions/57679221/asp-net-core-2-2-site-warmup

Warmup doesn't seem to work with in-process hosting.

@Indigo744
Copy link

Indigo744 commented Oct 21, 2019

Please reopen this issue. App initialization is not working.

@anurse self-contained deployment does not help.

Please ignore the previous message. After some more testing, the issue was because only Windows Authentification was activated. App Initialization needs Anonymous auth.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions feature-iis Includes: IIS, ANCM investigate Needs: Author Feedback The author of this issue needs to respond in order for us to continue investigating this issue.
Projects
None yet
Development

No branches or pull requests

7 participants