Insights has the following exception " System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 1 seconds elapsing. "
Issue Description: Insights has the following exception
System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 1 seconds elapsing.
Root Cause:
By default the Orchestrator API call timeouts were set too low for some environments. This is fixed in all 22.10+ versions.Diagnosing/Resolving:
- Typically this error would be discovered by following the steps outlined in this following KB article: How to Debug Insights License Issues?
- To resolve the issue, run the following powershell commands on the Insights machine.
-
# Create a backup of the existing appsettings.json file Copy-Item -Path 'C:\Program Files (x86)\UiPath Insights\Insights\appsettings.json' -Destination 'C:\Program Files (x86)\UiPath Insights\Insights\appsettings_backup.json'
Load the content of the existing appsettings.json file
$json = Get-Content 'C:\Program Files (x86)\UiPath Insights\Insights\appsettings.json' | ConvertFrom-Json
Add the 'Orch' property with nested 'timeoutInSeconds' property
$json | Add-Member -Type NoteProperty -Name 'Orch' -Value @{timeoutInSeconds = '60'}
Write the updated content back to the file
$json | ConvertTo-Json -Depth 25 | Set-Content 'C:\Program Files (x86)\UiPath Insights\Insights\appsettings.json'
- Alternatively, the file C:\Program Files (x86)\UiPath Insights\Insights\appsettings.json can be updated to include an Orchestrator key like below:
{
"Orch": {
"timeoutInSeconds": "60"
}
- The 'Orch' is added to the root level as a new key. Its recommended to run the powershell script if unfamiliar with setting files in the json format
-
- After the change has been made, do an IISreset and try logging in again
- If this issue does not resolve the issue, go through How to Debug Insights License Issues, collecting the logs as describe in that article
- Make sure to record the time stamps of when the login attempt is made. Need to correlate events between Orchestrator and Insights
- Additionally, grab the IIS logs from Orchestrator
- IIS Logging Overview | Microsoft Learn
- These are typically under: C:\inetpub\logs\LogFiles\W3SVC2
- This location is customizable, so check your IIS settings if the location is different.
- The two in W3SVC2 represents the site number. Typically the default site occupies W3SVC1.
- With the correct logs gathered, raise a ticket with UiPath Support.