Alfresco and high CPU usage

I finally found a solution for the high CPU usage bug in Alfresco. I still don’t know why it happens but at least I know how to deal with it so it does not make the whole environment unusable.

So the problem can be described as high CPU usage peaks which happen every 15 seconds. Every 15 seconds (default value) SOLR is asking Alfresco if it should index new data,and even though there is nothing to index you can observe that at least one CPU core usage jumps to 100% for 2-4 seconds.

Solution is to recreate SOLR indexes and clear the cached models, you can do this like this:


rm -fr alfresco/alf_data/solr/archive
rm -fr alfresco/alf_data/solr/workspace
rm alfresco/alf_data/solr/archive-SpacesStore/alfrescoModels/*
rm alfresco/alf_data/solr/workspace-SpacesStore/alfrescoModels/*

(backup them just in case!)

Then restart the server and give it some time to reindex data. Depending on the repository size it can take even very long hours.

Then the issue should be gone!