Overview
You have noticed that your Solr DB processes are failing due to memory consumption, and within the Solr Logs, you see the following error but are uncertain why the process is running out of memory:
- Error for /solr/file/select java.lang.OutOfMemoryError: Java heap space
You want a way to better understand the JVM heap consumption over time, connecting to Solr DB with JConsole.
Solution
To get a better look at the Solr DB process's memory usage, you can use JConsole, which is included in the JDK by default. By adding specific Java properties to your solr.conf file, you can connect with JConsole and better assess the cause of the trouble. While support for the usage of JConsole is limited, the following steps are provided to assist System Admins with accessing Solr using this 3rd-Party tool.
- Pause Solr Process
- Within WebNative Admin, Navigate to Database > Admin > Searching.
- Select Pause Solr Process.
- Open the Solr.conf
- Default Path:
/usr/etc/venture/var/solr.conf
- Default Path:
- Edit the javaparams using the following:
-
javaparams=-Xms<minvalue>m -Xmx<maxvalue>m
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.port=<free-port>
-Dcom.sun.management.jmxremote.rmi.port=<free-port2>
-Dcom.sun.management.jmxremote.authenticate=false
-Djava.rmi.server.hostname=<IP or HostName> - Note: It is recommended to leave your existing Xms and Xmx values until you are connected and can better review the usage. You can set the ports to any available port within your network.
-
- Start Solr Process
- Within WebNative Admin, Navigate to Database > Admin > Searching.
- Select Start Solr Process.
- Launch JConsole and connect to Solr using the hostname/IP and Port you configured.
Note: See Java OutOfMemory Exceptions (OOME) When Using the Solr Search Engine for more information about adjusting the heap memory based on your findings in JConsole.
Comments
0 comments
Please sign in to leave a comment.