Santa

Let’s Talk

We would love to hear from you. Want to know more about
our services or have any questions? Say Hi!

SOLR JVM Memory Getting Full

November 17, 2022
SOLR JVM Memory Getting Full
Mitesh Patel
Mitesh Patel
Technical Head
solr-jvm-memory-getting-full

So many times, you may have faced the issue of SOLR where it does not provide you with proper results due to its high usage. It gives you results sometimes and sometimes it does not.

Let us discuss why this happens:

What is default JVM Memory Setup?

Whenever you install SOLR, it has the default memory setup which has a space usage permission of 512MB

What will be the most reliable setting for the usage of memory?

So basically, it is all based on your project and its number of requests and how big those requests are. If your system has good enough space for free storage and the RAM is above 8 GB then you will easily be able to set the 2GB JVM memory for SOLR.

Due to less requests for production in those servers, this will not at all hamper the local environment or the staging area. It is advisable to have special SOLR server which is configured for using SOLR only. All the related work will then be managed by that including the increasing traffic.

Talking about JVM memory for production, we would suggest that if the server has 16 GB of RAM, you can assign 12 GB easily.

How to increase the memory setting of JVM?
  1. Go for the SOLR installed folder.
  2. Go for the Bin folder.
  3. Right click on the SOLR.in.cmd file and open it in Notepad.
  4. In this file, search for SOLR_JAVA_MEM. You will get the result as below:

    “REM set SOLR_JAVA_MEM=-Xms512m -Xmx512m”

  5. Once you get this, remove the REM as it is used for commenting the code.
  6. Now increase the memory as per your configuration for example, you want to set it at 2 GB then write 2 G by replacing 512 M.
  7. Now you can save the file.
  8. Go to the Windows Services Center in the Services and search for SOLR to restart the specific SOLR service for which changes have been made.
  9. Refresh the dashboard after restarting and you will be able to see that the memory of JVM has increased to 2G.

YOU MAY ALSO LIKE