How to run Publishing Service as a 64-bit process on Azure Web Apps


Description

This article provides steps to switching Sitecore Publishing Service Host to run as a 64-bit application on Azure Web Apps.

By default, Azure creates a 32-bit process during the deployment of Publishing Service Host on PaaS, even though the App Service is 64-bit. The downside of a 32-bit process is a 4 GB virtual memory limit. The application might throw an unhandled System.OutOfMemoryException when reaching this limit. Also, there might be slowness when publishing large batches of items, or if publishing a single item with a large number of links.

Solution

We recommend that you configure Sitecore Publishing Service Host to run as a 64-bit application:

  1. Make sure that the Publishing Service App Service is 64-bit:
    1. On the Azure portal, go to App Services.
    2. On the App Services page, navigate to the Publishing Service App Service.
    3. In the Settings menu, click Configuration.
    4. In the General settings pane, ensure that the Platform value under the Platform settings is set to 64 Bit:

      GeneralSettings.png

  2. When the Platform value has been set to 64 Bit, edit the Publishing Service web.config file:
    1. Open the Publishing Service App Service in the App Service Editor (Preview).
    2. In the root folder of the application, find and open the web.config file.
    3. Change the value of the processPath attribute in the <aspNetCore> node from "dotnet" to "C:\Program Files\dotnet\dotnet.exe" or "D:\Program Files\dotnet\dotnet.exe" depending on the file location. The dotnet.exe file is available in the App Service file system and can be located using the Kudu service either on the C: or D: drive.
  3. Restart the Publishing Service App Service by clicking Stop and then Start on the Overview page.