SharePoint Search Administrator Paused For External Request

Recently, I got one strange scenario. One of the users had requested me to reset the search index in SharePoint 2013 On-Premises. When I did reset the Search Index, I got the "Time Out " error and suddenly, the Search Administrator's status changed to "Paused" for external request, as showing below. I got frightened immediately and reset the index many times.


Then, I started looking on the ULS logs to find why it was getting this error. Unfortunately, I could not find any information about this issue. Then, I started googling in order to find the solution. Many of the bloggers have given different solutions with PowerShell scripts, such as - 

 Add-PSSnapin Microsoft.SharePoint.PowerShell

$ssa =Get-SPEnterpriseSearchServiceApplication –Identity "Search Service Application"

$ssa | Resume-SPEnterpriseSearchServiceApplication

The above mentioned script helps resume the Search Administration when it is stopped manually. I tried this script but it could not sort my problem out.

Then, I decided to know the purpose for which it had stopped the search application. So, I referred Learn why the Search service application is paused and what you can do to resume it in SharePoint 2013.

Here, it has some commands to check why the search application got paused. Those command are effective and return the value either True or False based upon your problem.

For my scenario, I got True for the following command.
 
($ssa.IsPaused() -band 0x80) -ne 0
 
This means "An administrator has manually paused the Search Service application". Then, I tried to restart the service application using GUI but that didn't help at all.
 
Again, I went back to look on the logs to find out the clue. Finally, I got something in Event Viewer logs.

" An update conflict has occurred, and you must re-try this action. The object SPAlternateUrlCollection Name=WEBAPPLICATION Parent=SPFarm Name=SharePoint_Config is being updated by Doman\Username in the w3wp process, on machine SERVER".

Voila ! Now, I have the solution.
 
To resolve this issue, clear the file system cache on all Servers in the Server farm, on which the Windows SharePoint Timer Service is running. To do this, follow these steps.
  1. In Windows Server 2008, the configuration cache is at the following location. 

    Drive:\ProgramData\Microsoft\SharePoint\Config\GUID

  2. Back up the cache.ini file.

  3. Delete all the XML configuration files in the GUID folder. Do this so that you can verify if the GUID folder is replaced by new XML configuration files when the cache is rebuilt.

    Note When you empty the configuration cache in the GUID folder, make sure that you do not delete the GUID folder and the cache.ini file that is located in the GUID folder. But, save it at some place safe in your system.

  4. Or rename the cache.ini file, like Cache1.ini, or ache.ini1.

  5. Start the Timer Service. 
Once completed, go to the Search Administration page and click Pause/Resume option under crawling. It will take a few minutes and returns to the Search Administration page. There, you can see that your service status is now "Running".


Finally, start the Full Crawl for all the content source.