While working on SOLR as part of Sitecore 9 build I faced a few issues with SOLR. Here I’m sharing my fixes to common issues I faced with SOLR
1. SOLR OutOfMemoryError
Once common issue I faced was with heap space. The error was org.apache.solr.common.SolrException; null:java.lang.RuntimeException:
java.lang.OutOfMemoryError: Java heap space
To fix this issue I increased the heap space from default 512 Mb to 1024 Mb. To do this I typed following command in windows command prompt
Once it successfully stopped I increased the heap size using below command
or Edit Solr.cmd file on your <solr Folder>\bin and change 512 to 1024 or your size you want.
Once successfully start verified it from the SOLR dashboard
2. Solr Exception Error opening new searcher
Fixing this issue is simple
Delete the affected cores from <your solr installed folder>\server\solr\core> then copy a working core folder and rename as affected core. Eg. If you have an issue with a core “Sitecore_web” then delete Sitecore_web folder from \server\solr\ folder and create a copy of core Sitecore_master and rename it to “Sitecore_web”. Then open this folder and edit core.properties. Change name=Sitecore_web
Then delete the indexed file using the following command
Then populate solr schema from the Sitecore control panel and rebuild the index.