Pivotal Knowledge Base

Follow

How to set Java Heap Space for GPText Solr instances

Environment

Product Version
 Pivotal GPText  1.2.x, 1.3.x
 OS  RHEL 6.x
 Others  

 

Purpose

This article will show you how to easily and safely change the Java Heap Space for GPText Solr instances.

 

Cause 

Sometimes it is necessary to increase the Java Heap Space to avoid out of memory (OOM) errors like:

SQL_ERROR. Class: 'XX', Condition: '000', Detail: 'ERROR: Error sending data. java.lang.OutOfMemoryError: Java heap space (solr_curl.c:826) (seg64 slice5 sdw11:40004 pid=10240) (cdbdisp.c:1326); Error while executing the query'

 

Procedure

Note: $SEGMENT_DATA_DIRECTORY here represents one of the segment data directories.

1. Check current running & configure Java Heap Space using the commands below:

$ ps -ef | grep solr
gpadmin 7893 1 0 17:52 ? 00:00:05 /usr/local/greenplum-db/ext/jre-1.6.0_32/jre1.6.0_32/bin/java -server -Xms1024M -Xmx2048M -Dlog4j.configuration=file:/gpdata/segments/gpseg0/solr/lib/log4j.properties -Djetty.home=/usr/local/greenplum-text-1.3.0.3/greenplum-solr -Dsolr.solr.home=/gpdata/segments/gpseg0/solr -Djetty.port=39900 -jar /usr/local/greenplum-text-1.3.0.3/greenplum-solr/start.jar
$ cat $SEGMENT_DATA_DIRECTORY/solr/jetty.conf | grep JAVA
export JAVA_OPTS="-Xms1024M -Xmx2048M"

2. Using this command, change the Java Heap Space:

$ source /usr/lib/greenplum-text/greenplum-text_path.sh 
$ gptext-config -o "-Xms1024M -Xmx4096M"

3. Confirm that the change has been made in the jetty.conf

$ cat $SEGMENT_DATA_DIRECTORY/solr/jetty.conf | grep JAVA
export JAVA_OPTS="-Xms1024M -Xmx4096M"

4. Restart the GPText 

$ gptext-stop
$ gptext-start

5. Check and confirm the Java Heap Space of the running Solr instances. The process should reflect the changed settings.

$ ps -ef | grep solr
gpadmin 7893 1 0 17:52 ? 00:00:05 /usr/local/greenplum-db/ext/jre-1.6.0_32/jre1.6.0_32/bin/java -server -Xms1024M -Xmx4096M -Dlog4j.configuration=file:/gpdata/segments/gpseg0/solr/lib/log4j.properties -Djetty.home=/usr/local/greenplum-text-1.3.0.3/greenplum-solr -Dsolr.solr.home=/gpdata/segments/gpseg0/solr -Djetty.port=39900 -jar /usr/local/greenplum-text-1.3.0.3/greenplum-solr/start.jar:

 

Additional Information

- This article is not applicable for GPText 2.0 or higher.


 

 

Comments

  • Avatar
    Alex Jiang

    jira => TA-982 could be a good reference for GPText OOM issue.

Powered by Zendesk