Quantcast
Channel: Performance
Viewing all articles
Browse latest Browse all 447

Autostart Provider issue

$
0
0

Hi,

I am experience an issue with the Service Autostart Provider IIS feature.

My server is a Windows Server 2012 with IIS 8.0.

In this server, I have deployed an MVC application in different webapplications of the same website, this MVC application that is deployed multiple times is exactly the same but some changes in the connectionstrings in the web.config, so we have the same web for different clients. Almost all these webapplications are using different app pools.

I have enabled the autostart provider for only one of them but not for the others and what I can see is when the code of autostart is being executed (only for that app) all other worker processes instances start using the CPU and the memory causing a very bad performance for the server.

Can you please help me with this issue? Am I doing something wrong or I missconfigured something in the server? I expect that only one of the processes consumes memory and CPU but I don’t understand why the others are affected.

This is the piece of code the autostart provider is executing (only some calls to warmup db connection):

And this are the changes done in applicationHost.config:

Inside <system.applicationHost> we define the source of provider:

<serviceAutoStartProviders>

<add name="CyberResilienceAutoStartProvider" type="CyberResilience.MVC.ApplicationPreload, CyberResilience.MVC" />   

</serviceAutoStartProviders>

And inside the site we add the autostart properties:

<application path="/CyberResilience_PROD_3_2"

applicationPool=" CyberResilience_PROD_3_2" serviceAutoStartEnabled="true" serviceAutoStartProvider="CyberResilienceAutoStartProvider" preloadEnabled="true">

<virtualDirectory path="/"                            physicalPath="%SystemDrive%\inetpub\wwwroot\CyberResilience_PROD_3_2" />

</application>

 

This are others sites (no preload, no autostart):

 <application path="/CSF_Testing_Release_3_2" applicationPool="DefaultAppPool" preloadEnabled="false">

<virtualDirectory path="/" physicalPath="%SystemDrive%\inetpub\wwwroot\CSF_Testing_Release_3_2" />

</application>

<application path="/DemoRegion" applicationPool="DemoRegion" serviceAutoStartEnabled="false" serviceAutoStartProvider="" preloadEnabled="false">

    <virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot\DemoRegion" />

</application>

<application path="/DemoManufacturing" applicationPool="DemoManufacturing" serviceAutoStartEnabled="false" serviceAutoStartProvider="" preloadEnabled="false">

<virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot\DemoManufacturing" />

</application>

<application path="/ISOTest" applicationPool="ISOTest" serviceAutoStartEnabled="false" serviceAutoStartProvider="" preloadEnabled="false">

    <virtualDirectory path="/" physicalPath="%SystemDrive%\inetpub\wwwroot\ISOTest" />

</application>

When I force the execution of the preload like for example doing a change in the web.config of the site previously configured, I see the following in task manager and resource monitor (the CPU and memory for different IIS worker processes start to grow):

Before doing the change (all normal):

When autostart is executing:

Thank you so much.


Viewing all articles
Browse latest Browse all 447

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>