2
我遵循here和here的指令來增加我的SOLR內存分配。我這樣做是因爲SOLR服務器在某些高頻率和高容量索引活動期間定期關閉。SOLR 6.2忽略堆設置(SOLR_JAVA_MEM參數)
我有點新的使用SOLR和Ubuntu所以忍耐一下,但我發現那裏的SOLR_JAV_MEM參數存在幾個地點:
/opt/solr-6.2.0/bin/solr.in.sh
/opt/solr-6.2.0/bin/solr.in.cmd
/opt/solr-6.2.0/bin/solr.cmd
The same set of files in this directory: /home/deploy/.rbenv/versions/2.2.4/lib/ruby/gems/2.2.0/gems/sunspot_solr-2.2.5/solr/bin
And this directory:
/home/deploy/solr-6.2.0/bin
And finally, in this file: /etc/default/solr.in.sh
任何地方我見過SOLR_JAV_MEM或SOLR_HEAP PARAM有一個數字,我已經有一個較大的值替換它,例如在/opt/solr-6.2.0/bin/solr.in.sh:
# Increase Java Heap as needed to support your indexing/query needs
SOLR_HEAP="1500m"
# Expert: If you want finer control over memory options, specify them directly
# Comment out SOLR_HEAP if you are using this though, that takes precedence
#SOLR_JAVA_MEM="-Xms1512m -Xmx1512m"
如果我正確地測量它,我仍然只能看到分配給SOLR的大約500MB內存,如以下命令所示:
[email protected]:~# service solr status
Found 1 Solr nodes:
Solr process 15259 running on port 8989
{
"solr_home":"/var/solr/data",
"version":"6.2.0 764d0f19151dbff6f5fcd9fc4b2682cf934590c5 - mike - 2016-08-20 05:41:37",
"startTime":"2016-09-28T15:01:18.001Z",
"uptime":"0 days, 0 hours, 12 minutes, 28 seconds",
"memory":"100 MB (%20.4) of 490.7 MB"}
我做錯了什麼?或者我只是不正確地測量內存?請讓我知道,如果我可以提供add'l信息。謝謝!
謝謝,您的回答指出我的方向正確。在我的服務器上運行'sudo find -name solr.in.sh'後,它出現在Gemfile solr.in.sh文件中,我可以正確設置mem的大小。 – Shadoath