線上solr忽然啓動不了,一啓動就自動kill了,報錯:java
# java.lang.OutOfMemoryError: Java heap space # -XX:OnOutOfMemoryError="/opt/solr/bin/oom_solr.sh 8983 /opt/solr/server/logs" # Executing /bin/sh -c "/opt/solr/bin/oom_solr.sh 8983 /opt/solr/server/logs"... Running OOM killer script for process 18671 for Solr on port 8983 Killed process 18671
由於solr使用的內存滿了(機器內存還很充足)。spa
處理方案一:.net
修改/opt/solr-5.5.1/bin下的solr文件:code
JAVA_MEM_OPTS=() if [ -z "$SOLR_HEAP" ] && [ -n "$SOLR_JAVA_MEM" ]; then JAVA_MEM_OPTS=($SOLR_JAVA_MEM) else SOLR_HEAP="${SOLR_HEAP:-2g}" JAVA_MEM_OPTS=("-Xms$SOLR_HEAP" "-Xmx$SOLR_HEAP") fi ``` 在上面的配置後面添加兩行:
SOLR_JAVA_MEM="-Xms2g -Xmx2g"server
JAVA_MEM_OPTS=($SOLR_JAVA_MEM)
``
blog
方案二(推薦):ip
修改solr-5.5.3/bin/solr.in.sh SOLR_HEAP="512m" 爲: SOLR_HEAP="8g"
方案三(沒有試過):內存
solr的啓動腳本里默認狀況下最大啓動內存爲512M ,經過啓動參數 -m 重啓內存爲2Gget
[root@kaifa-19 bin]# ./solr start -m 2g
做者:子龍修仙
來源:CSDN
原文:https://blog.csdn.net/qq_41665356/article/details/80374884
版權聲明:本文爲博主原創文章,轉載請附上博文連接!it