THIS IS ARCHIVED DOCUMENTATION

Coveo for Sitecore Security Cache Refresh Issues

Description

When Refreshing the Security Cache, the process goes on and eventually stops with some or all of your securities not being updated on your documents.

In addition, you see one of these error messages in your CES System Log (<INDEX_DRIVE>:\CES7\Log):

WARNING\|20XX-XX-XX\|00:00:00\|0\|Error while expanding group (class CSP::SecurityException: Unexpected exception in method 'GetMembersAndMappings': System.Net.WebException: The request was aborted: The operation has timed out. ---&gt; System.Net.WebException: The request was aborted: The operation has timed out

OR

WARNING\|20XX-XX-XX\|00:00:00\|0\|Error while expanding group (class CSP::SecurityException: Call to b\_\_6 was aborted because no progress had been reported for X seconds.)

Environment

  • Coveo for Sitecore 558+
  • Diagnosis
  • Security Cache, Security Cache Refresh

Diagnostic Steps

Step 1

  1. From your CES Server, open a Web Browser and connect to your Sitecore instance Home Page.
  2. Are you able to connect to your Sitecore instance? If yes, proceed to Diagnostic Step 2.
  3. If you can’t connect to your Sitecore Instance Home Page from your CES Server, contact your IT department.

Explanation

Coveo for Sitecore Security Provider must be able to connect to your Sitecore Server from your CES Server. Otherwise, the Refresh of the Security Cache will fail.

Step 2

Following the documentation on How To Modify the Coveo for Sitecore Security Provider Refreshing Parameters,

  1. Open the CES Console.
  2. Set the MaxAllowedTimeWithoutProgress parameter to 10800.
  3. Refresh the Security Cache.
  4. Do you see the error in the Console during the Refresh? If yes, proceed to point 5.
  5. Set the NumberOfUsersPerRequest parameter to 50000.
  6. Refresh the Security Cache.
  7. Do you see the error in the Console during the Refresh? If yes, proceed to point 8.
  8. Set the Timeout parameter to 3600.
  9. Refresh the Security Cache.
  10. Do you see the error in the Console during the Refresh? If yes, proceed to Diagnostic Step 3 below.

Explanation

Factors like the amount of users and groups, the size of each groups, the speed of your Sitecore instance and the latency on your Network can cause the Security Provider to fail.

The main reason is that Security Provider has default configurations that works in most environments and it sometime needs to be modified.

Step 3

  1. Open the Windows Event Viewer(https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc766042(v=ws.11)) Application Logs.
  2. Around the same time as the error message occurs in your System Log, do you see this error:

    Process information:Process ID: 36604Process name: w3wp.exeAccount name: NT AUTHORITY\\NETWORK SERVICEException information:Exception type: HttpExceptionException message: Request timed out.Request information:Request URL: http://serverName.org/sitecore \[^\]modules/web/coveo/webservice/SitecoreWebService.asmxRequest path: /sitecore modules/web/coveo/webservice/SitecoreWebService.asmxUser host address: xx.xx.xx.xUser: sitecore\\CoveoCrawlerIs authenticated: TrueAuthentication Type:Thread account name: NT AUTHORITY\\NETWORK SERVICEThread information:Thread ID: 9Thread account name: NT AUTHORITY\\NETWORK SERVICEIs impersonating: False

  3. If yes, proceed to Diagnostic Step 4.
  4. If you don’t see the error, contact Coveo Support.

Explanation

This message is stating that the SitecoreWebService itself timeout following a request.

Since the Event happens at the same time than the Refreshing of the Security Cache, it means that the request from the Coveo for Sitecore Security Provider caused the service to timeout.

There are two possible reasons for this:

  1. Too many users/roles on a Sitecore role. Takes more time to expand it.
  2. Slow Sitecore server. May be due to hardware of the server or its load.

Step 4

  1. Open the <YourSitecoreInstance>\Website\Web.config file.
  2. Locate the <httpRuntime maxRequestLength="512000" executionTimeout="600" enableKernelOutputCache="false" relaxedUrlToFileSystemMapping="true"/> node.
  3. Set executionTimeout to a higher number, like 3600.

Explanation

The solution is to increase the maximum amount of time that the SitecoreWebServices is allowed to take in order to complete the request.