Scheduled Recycling Of Orchestrator Application Pool For Improved Performance

How to schedule regular recycles of the Orchestrator App pool to improve performance and minimize downtime?

Issue Description: Unexpected downtime or performance issues may be experienced with the Orchestrator application due to automatic recycling occurring when certain conditions are met, such as memory usage or a specified number of requests. These performance issues can impact business processes and the overall user experience.

Resolution: To improve performance and minimize downtime, it is recommended to schedule regular Orchestrator application pool recycles during periods of low usage or maintenance windows.

By following these steps, manage the health of the Orchestrator proactively and minimize potential issues related to memory leaks, resource exhaustion, or other problems:

  1. Identify periods of low usage or maintenance windows: Analyze your Orchestrator usage patterns and find times when the application is least likely to be actively used by your staff. This could be during non-business hours, weekends, or other periods specific to your organization's workflow.
  2. Set up a schedule for recycling the application pool using either the IIS Manager or PowerShell scripting:
  3. a. Using IIS Manager:
  • Open the Internet Information Services (IIS) Manager on your Orchestrator server.
    1. Navigate to the server's hostname, expand "Sites", and select your Orchestrator website
    2. In the right pane, click on "Application Pools"
    3. Right-click on the Orchestrator Application Pool (usually named UiPathOrchestrator) and choose "Recycling" from the context menu
    4. In the "Edit Application Pool Recycling Settings" window, deselect any current automatic recycling settings (e.g., regular time intervals or specific memory limits)
    5. Check the box for "Specific time(s)" and enter the desired time for the recycling action
    6. Click "OK" to save the settings.

  1. b. Using PowerShell scripting:
  • Create a new PowerShell script file (e.g., AppPoolRecycle.ps1) with the following content:

$AppPoolName = "UiPath Orchestrator"

$RecyclingTime = "02:00:00"

$appCmd = "$env:SystemRoot\system32\inetsrv\appcmd.exe"

$configSection = "/section:system.applicationHost/applicationPools"

$scheduleValue = "/+[name='$AppPoolName'].recycling.periodicRestart.schedule.[value='$RecyclingTime']"

& $appCmd set config $configSection $scheduleValue /commit:apphost

  • Ensure that the desired recycling time is set in the $RecyclingTime variable.
    • Run the script with administrator privileges on the Orchestrator server to apply the changes.

Now, monitor the Orchestrator's performance and adjust the recycling frequency as needed, based on the specific usage patterns and requirements.

By implementing these steps, it is possible to proactively manage the health of the Orchestrator and minimize potential issues related to memory leaks, resource exhaustion, or other problems that may occur over time.