Increasing SOLR Heap Size:
If you manage a large number of files (especially text based documents) and are seeing SOLR crash with out of memory error in its logs, you can use the following tip to see if this solves the issue.
By default, Solr ships with 512MB for heap size. In some installations with large number of files (especially text based documents), this heap memory is not enough. SOLR might crash in these cases with out of memory error in its logs.
- Follow these steps to increase the heap size.
- In this example, the heap size is increased to 2G.
- Administrators can increase it more depending on their site needs.
To increase the Solr heap size:
- If SOLR server is not stopping when stopped from services, open the control panel and kill the java process. Make sure no process is listening at port 8983.
SOLR may require more memory depending on the amount of data being indexed (JAVA OOM errors). In that case, the only option is to bump of the system memory and increase the JAVA heap limit
Start the SOLR service from FileCloud control panel or Windows services panel.
Changing Solr Temporary folder:
Make sure to restart Solr for the changes to take effect.
Enabling Authentication for Solr:
- Create a new file with name security.json at /opt/solr76data/var/solr/data/security.json for Linux or C:\xampp\solr\server\solr\security.json for Windows
- Add the following lines to security.json file. This enables login with username "solr" and password "SolrRocks"
3. Restart Solr and check http://localhost:8983/solr for authentication
4. Add the following entries to the cloudconfig:
5. To change the password please use the following command:
6. To change the password for SSL protected SOLR server please use the following command:
NOTE: "solr" username can be changed to anything but it has to be replaced for all the steps (including the initial config).
7. To make solr daemon detect Solr status you need to update the following config files:
This necessary only if authentication is enabled on solr