Connecting to Solr DB with JConsole


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.


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.

  1. Pause Solr Process
    1. Within WebNative Admin, Navigate to Database > Admin > Searching.
    2. Select Pause Solr Process.
  2. Open the Solr.conf
    1. Default Path: /usr/etc/venture/var/solr.conf
  3. Edit the javaparams using the following:
    • javaparams=-Xms<minvalue>m -Xmx<maxvalue>m<free-port><free-port2>
      -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.
  4. Start Solr Process
    1. Within WebNative Admin, Navigate to Database > Admin > Searching.
    2. Select Start Solr Process.
  5. 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.


External Resources for JConsole:



Please sign in to leave a comment.