Search code examples
azureweb-applicationsvirtocommerce

VC Admin + Azure Web Apps + Hangfire Job + Worker Process requested recycle due to 'Percent Memory' limit


When we start re-index catalog (~15000 products) in VC Admin, we can not finish the process because Azure automatically recycles Web Apps.

Error message: Worker Process requested recycle due to 'Percent Memory' limit. Memory Used: 4273229824 out of 3757625344 available. Exceeded 90 Percent of Memory.

Web Apps Price plan is S2.

Please advise.

PS: Temporary workaround is "Increase price plan to S3".


Solution

  • It is cause because "Smart-cache" didn't use cache expiration.

    How to solve this problem:

    • Update VirtoCommerce.Cache module to latest version.

    • Add follow section to platform Web.config

       <system.runtime.caching>
          <memoryCache>
                 <namedCaches>
                      <add name="memCacheHandle"  physicalMemoryLimitPercentage="80" pollingInterval="00:00:30" />
          </namedCaches>
      </memoryCache>