Difficulty setting Solr JVM memory settings on Ubuntu with Bitnami AMI

时间秒杀一切 提交于 2019-12-12 23:51:18

问题


I am using the Apache Solr powered by BitNami EC2 AMI. Solr is running, but I'd like to change the startup configuration to increase the amount of memory allocated to JVM.

I have tried modifying the startup script at at /opt/bitnami/apache-solr/scripts/ctl.sh by modifying the following line:

SOLR="$JAVABIN -Dsolr.solr.home=$SOLR_HOME -Djetty.logs=$INSTALL_PATH/logs/ -Djetty.home=$INSTALL_PATH/ -jar $INSTALL_PATH/start.jar $INSTALL_PATH/etc/jetty.xml"

I've tried different permutations for the memory flags and none of them work (some of them cause the Solr server to fail to start at all, while others allow it to start but have no effect on the JVM memory allocated). This is what I've tried adding to the line:

-Xmx 1000 -Xms 8000

-Xms1000m -Xmx8000m

-Xms1000 -Xmx8000

-Xms 1000m -Xmx 8000m

What is the correct way of going about this?


回答1:


It turns out that the arguments needed to be at the start of the line. The following works:

SOLR="$JAVABIN -Xmx7168m -Xms1024m -Dsolr.solr.home=$SOLR_HOME -Djetty.logs=$INSTALL_PATH/logs/ -Djetty.home=$INSTALL_PATH/ -jar $INSTALL_PATH/start.jar $INSTALL_PATH/etc/jetty.xml"



来源:https://stackoverflow.com/questions/18544740/difficulty-setting-solr-jvm-memory-settings-on-ubuntu-with-bitnami-ami

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!