Clear the Sharepoint Cache

If you have trouble with e.g. your SharePoint Workflow Timer Job, which seem to stuck in state “Running” for many hours, or other Services in the farm, or simply the farm does not running well or it is throwing weird errors, then it might be helpful to clear the file system cache on your frontend servers.
To do so, follow the steps below on all of your servers, which are running the Windows SharePoint Services Timer Service:

  • Open the Services window (Start->Run->Services.msc->Enter) and stop the “SharePoint 2010 Timer” service.
  • If you use a service account for this service, I would also recommend to reenter the password.
    Right click onto the SharePoint 2010 Timer Service, then on properties and in the “Log On” tab reenter the password an press the “Apply” button.
  • Now go to the directory C:ProgramDataMicrosoftSharePointConfig.
    Here you may see 2 folders with GUIDs.
    We need the one where you see alot of XML-Files and ONE Cache.ini file.
  • Backup this GUID folder to be on the safe side.
    Now be careful:
  • Delete ONLY all the XML-files in the GUID folder:
    Don’t worry, these XML-files will be created automatically again in the next steps below.
  • Now open the Cache.ini file. Here you will only see a number in it.
    Replace this number by typing a 1.
  • Save the Cache.ini file and close it.
  • Start the SharePoint 2010 Timer Service again.

You will now see that the cache will be recreated by automatically recreated XML-files in the folder. This will take some minutes to complete.
Do these steps above on the other frontend servers as well.

MOSS 2007: Error deploying solution

Yes, today I’ll post about MOSS2007, this problem is focused in a chain reaction in the farm, so let’s begin:

The farm consists in 3 servers, one for CA, another for Intranet and another one for Extranet. The problem is the following, we wanted to implement a new solution to the farm, but when we deployed the solution it gets an error.

Previously some people were digging on the server to know what is happening and accidentaly stopped the web application service (¡¡Error!!) in one of the servers and the service stuck on stopping state.

So, let’s begin how I face the problem:

First of all, I opened a CMD and go to the following directory: C:Program FilesCommon FilesMicrosoft SharedWeb Server Extensions12BIN

Next step is to stop the service by stsadm command:

  • stsadm -o provisionservice -action stop -servicetype SPWebService
  • Did IISReset
  • After that I could start it either from command line or from central admin. stsadm -o provisionservice -action start -servicetype SPWebService

If you receive a message error about this operation is already started by other process, try to restart the timer service in all SharePoint servers.

So first problem, solved, next one to solve is the non deployment of the solution. You need to go to Operations tab and go to deployment status, and manually start the deployment of the solution.

After some minutes, the deployment was in “Error” state, so I entered in the solution and I realized that was showing the following error message:

“A feature with ID GUID has already been installed in this farm. Use the force attribute to explicity re-install the feature.”

So what can we do? Again stsadm commands, so let’s go

We need to execute the following lines:

stsadm -o deploysolution -name Mysolution.wsp -immediate -force
stsadm -o execadmsvcjobs

After a few minutes, you can check the solution and see if all the solutions are already installed in the farm.

That’s all, good luck