我已经按照这里和这里的说明来增加我的 SOLR 内存分配。我这样做是因为 SOLR 服务器在某些高频和高容量索引活动期间定期关闭。
我对使用 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
Run Code Online (Sandbox Code Playgroud)
在我看到带有数字的 SOLR_JAV_MEM 或 SOLR_HEAP 参数的任何地方,我都将其替换为更大的值,例如在 /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 …Run Code Online (Sandbox Code Playgroud)