Serious IIS Application Pool recycling bug/design flaw

10 months ago
Our current appsettings.json

...
    "ClearPluginShadowDirectoryOnStartup": true,
    "CopyLockedPluginAssembilesToSubdirectoriesOnStartup": false,
    "UsePluginsShadowCopy": true,
    "UseUnsafeLoadAssembly": true,
...


Per the Azure installation guidance make the following change:
"UsePluginsShadowCopy": false
10 months ago
Will try! Thank you!
10 months ago
And check the list of unused and uninstalled plugins.
Remove them from the folder Plugins.
9 months ago
Fix:  Disable overlapped application pool recycling.  

In your Azure web app, create this applicationHost transformation in the \sites\ folder.  Name the file applicationHost.xdt.   Don't put it in wwwroot, put it in the parent of wwwroot X:\home\sites\

<?xml version="1.0"?>
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">>
  <system.applicationHost>
    <applicationPools>
      <add name="dev-yoursitename" xdt:Locator="Match(name)">
        <recycling disallowOverlappingRotation="true" xdt:Transform="Insert" />
      </add>
      <add name="~1dev-yoursitename" xdt:Locator="Match(name)">
        <recycling disallowOverlappingRotation="true" xdt:Transform="Insert" />
      </add>
    </applicationPools>
  </system.applicationHost>
</configuration>


Replace the dev-yoursitename and ~1dev-yoursite name with the values from a powershell command run in KUDU: echo %WEBSITE_SITE_NAME% and echo %WEBSITE_IIS_SITE_NAME%

If you want to be able to deploy this fix, add the file to your Nop Presentation folder (next to web.config) and set to Copy Always.  Then, in the pipeline release deployment, in the Azure App Service Deploy task, add a Post Deployment Action

cp applicationHost.xdt ../
6 months ago
hello
i faced this issue with smarterasp shared hosing using nop 4.2 and i can't disable app pool recycling it should be VPS.
is there another solution either upgrade the hosting plan ?
Tnanks
3 weeks ago
Hi there,
I have the same exact issue. The application restarts exactly in every 29 hours.

Application settings are:
    "ClearPluginShadowDirectoryOnStartup": true,
    "CopyLockedPluginAssembilesToSubdirectoriesOnStartup": true,
   "UsePluginsShadowCopy": false,
    "UseUnsafeLoadAssembly": true,

Plugin/bin folder is empty.

May i ask you if this is related to any folder access permissions of application pool?
3 weeks ago
I kind of solved this problem. There are two things that I changed, and the issue is resolved.
1. First, I changed the application pool settings in IIS.
Idle time-out (minutes): 0
Regular time interval (minutes): 0
https://www.nopcommerce.com/en/common-tips-settings-recommendations-to-optimize-performance-in-nopcommerce

2. I deleted the uninstalled plugins. There was a mailchimp plugin which was outdated, I updated and installed it.

So I have no error, or application restart for the last 4 days.
I hope this would help.