Skip to main content

SharePoint - Clear Timer Timer Cache / Clear Configuration Cache

On number of occasions we may need to Clear SharePoint Configuration Cache, also known as SharePoint Timer Cache. 
Let us consider one scenario; we have a SharePoint Farm with high availability (Streamlined topology with 4 Front End Web Servers), we want to change or reset Farm Passphrase. I changed the Passphrase successfully and now want to rejoin another Front End Webserver to the Farm which was disconnected earlier before resetting the Farm Passphrase.

Note: To know how to change the SharePoint Passphrase, please visit my article here.

I tried to run the Configuration Wizard on the Front End Webserver for rejoining it to the Farm and after entering the new Passphrase it stops with error "Could not connect to the Configuration Database, make sure the Passphrase it correct". 

To resolve this issue we need to clear the Configuration / Timer Cache from all the Servers on the SharePoint Farm, because the Farm is still using the Configuration Cache and we don't want SharePoint to do that.

You can find multiple script on Internet to run on CA Server to clear cache on all the Servers.
You can do it manually using the following Steps (On All Servers in the Farm):
You can find a nice powershell script to do the same with powershell here.

  • Login to the Server, Windows + R (Run) - Type 'services.msc' Or Click Start, point to Administrative Tools, and then click Services.
  • Locate SharePoint "SharePoint Timer Service", Stop the Service.
  • Open File System location: 'SystemDrive:\Programdata\Microsoft\SharePoint\Config' if you can't open it because of explorer settings, type ''SystemDrive:\Programdata' in Windows -> Run and then locate the Folder. Or you can change the setting to show Hidden Files/Folders in Explorer by going to Explore - > View -> Options - >Change Folder and Search Options -> 'View' Tab -> In hidden files and folder category, enable 'Show Hidden Files and Folders'.
          


  • You can see multiple folders inside the Config folder, locate the folder with a GUID naming convention with '-' hyphen used in name (you can have folders inside these folder, do the same for those folders as well). You may have multiple folders with this name format. Open each folder, there would be a file named 'cache.ini'. Take a backup of this file and delete all other files from the folder (mainly xml). Once you clear the folder -> copy the 'cache.ini' to the folder (if it is also deleted, if it’s there, you can use the same). Open cache.ini in notepad, you may see a numeric 5-6 digit value in that. Change that value to '1'. So the only text in the file will be 1. Save the file.
  • Start the "SharePoint Timer Service", within some time you will notice new xml files being created on the folder and cache file is also changed. This means everything is all right. Do this for all folder with the hyphen '-' based GUID folders and sub folders.'
  • This should be done on all the servers in the Farm, please note that; in my case I did it from only one application server (having CA) and the Front End Webserver which I want to rejoin to the Farm. And it worked for me.
Now your Configuration Wizard should run successfully.


Comments

Popular posts from this blog

Visual Studio Build Issue : Build: 0 succeeded or up-to-date, 0 failed, 1 skipped

"Unable to build or clean the solution in Visual Studio (applicable to almost all versions), output window message is : Build: 0 succeeded or up-to-date, 0 failed, 1 skipped". If you are facing the above issue, you are at the right place. Perhaps following can help you. BTW, the above image is self explanatory, let me still brief if in case the image is not getting downloaded on your Internet connection. In VS menu, go to Tools -> Options. Select -> Projects and Solutions -> Build and Run. Uncheck - "Only build startup projects and dependencies on Run." Your problem shall be resolved. Thank you for visitng my blog.

SharePoint log error "Cannot find site lookup info for request Uri http://"

There are many reasons for which you can have this error in your SharePoint server logs. One of the scenerio is explained below. Main Reason: One of the major reason for this error is; the SharePoint is not able to resolve the URL. There is something wrong with the alternate access mapping. Please make sure the alternate access mapping is configured properly. For more details on alternate access mapping in SharePoint, please visit: Alternate Access Mapping We had sharepoint 2016 and all website under that were https:// from the firewall. When we tried to load the web site, error occured with a Correlation Id. After checking the code I found the error message "Cannot find site lookup info for request Uri http://". I URL was able to authenticate the user but on page load the error occurs. My alternate access mapping was: https://mysite                                   ...

SharePoint PowerShell to Manage Term Store / Add Terms using PowerShell

SharePoint PowerShell to Manage Term Store / Add Terms //get the term store $mysite = get-spsite “ http://yoursite:portnumber ” $taxonomySession = get-taxonomySession -site $mysite $termStore = $taxonomySession.TermStores[“Managed Metadata Service”] //now we will create the Term Store groups. Before we create any group we will check if the group already exists Example 1: if($termstore.groups["News Keys"] -eq $null) { $termstoregroup = $termstore.creategroup("News Keys");  $termstore.description = "News Group";  $termstore.addgroupmanager ("KS\spadmin"); $termstore.addcontributor ("ks\k.singh");$termStore.CommitAll();} This is not working as “ description ” is not an identified property. Example 2: if($termstore.groups["Main News Keys"] -eq $null) { echo "group is not there";  echo "group is there"; $termstoregroup = $termstore.creategroup("Main News Keys"); $terms...