Java/Solr – Could Not Reserve Enough Space For Object Heap.

Home » CentOS » Java/Solr – Could Not Reserve Enough Space For Object Heap.
CentOS 3 Comments

Hi All.

# cat /etc/redhat-release CentOS release 6.2 (Final)

# uname -r
2.6.32-220.17.1.el6.CentOS.plus.x86_64

# rpm -qa | grep solr apache-solr-3.5.0-1.5…

I have a solr installation which is invoked:
/usr/bin/java -Xms25g -Xmx25g -DSTOP.PORT

3 thoughts on - Java/Solr – Could Not Reserve Enough Space For Object Heap.

  • you should upgrade to 6.4… how do you “restart”? are you sure that your java is stopped before starting it again?
    25G x2 > 32(ram) + 4(swap) until the 1st java instance is actually stopped.

    Tru

  • stop/start, I use restart which is stop and start:
    start () {
    echo -n $”Starting $prog: ”
    if [ -e /var/lock/subsys/solr ]; then
    echo -n $”cannot start solr: solr is already running.”;
    failure $”cannot start solr: solr already running.”;
    echo
    return 1
    fi
    cd $SOLR_DIR
    daemon $JAVA $JAVA_OPTIONS 2>&1 | /usr/bin/logger -t ‘solr’ -p info
    — &
    RETVAL=$?
    echo
    [ $RETVAL = 0 ] && touch /var/lock/subsys/solr
    return $RETVAL
    }

    stop () {
    echo -n $”Stopping $prog: ”
    if [ ! -e /var/lock/subsys/solr ]; then
    echo -n $”cannot stop solr: solr is not running.”
    failure $”cannot stop solr: solr is not running.”
    echo
    return 1;
    fi
    cd $SOLR_DIR
    $JAVA $JAVA_OPTIONS_STOP –stop
    RETVAL=$?
    sleep 2
    echo
    [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/solr
    return $RETVAL
    }

    2013/7/4 Rafa

LEAVE A COMMENT