Closed JoshDi closed 4 years ago
JVM heap memory isn’t specifically constrained for Solr. You can probably compare with your system:
sudo docker-compose exec search java -XshowSettings:vm -version
java -XshowSettings:vm -version
root@HTPC-Xeon:/storage/musicbrainz-docker/admin# docker-compose exec search java -XshowSettings:vm -version
VM settings:
Max. Heap Size (Estimated): 26.67G
Ergonomics Machine Class: server
Using VM: OpenJDK 64-Bit Server VM
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_212-b04)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.212-b04, mixed mode)
root@HTPC-Xeon:/storage/musicbrainz-docker/admin# java -XshowSettings:vm -version
VM settings:
Max. Heap Size (Estimated): 26.67G
Ergonomics Machine Class: server
Using VM: Java HotSpot(TM) 64-Bit Server VM
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)
Sorry, I was wrong, Solr is indeed using a Java heap of 512MB by default. It can already be modified through the environment variables SOLR_HEAP
or SOLR_JAVA_MEM
(the latter takes precedence over the former). See solr.in.sh
for details.
Create a file local/compose/search-memory.yml
version: '3.1'
# Description: Increase Java Heap for Solr search
services:
search:
environment:
- SOLR_HEAP=8g
At this point, it should show up in the list of available compose files:
admin/configure list
Enable this file for the compose project:
admin/configure add local-compose-search-memory
docker-compose up -d search
See “Docker Compose overrides” for details on how to use Docker Compose overrides here.
great! I will try this. thank you
Set default value to 2GB and documented how to change this value in pull request #148, now merged.
Note that mbvm-38-dev
branch has been merged into master
too.
Hi. I followed these instructions while installing and I received an error:
$ sudo docker-compose up -d
ERROR: The Compose file is invalid because:
Service search has neither an image nor a build context specified. At least one must be provided.
I guess it's because I'm setting up the Postgres database only using with alt-db-only-mirror
. This might just be worth noting for anyone following those instructions.
I commented out the lines for the "search" service (and kept the lines for service "db")
Hi @jvlmdr, which instructions are your referring to? Please open a separate issue if needed.
Oh yeah, sorry for cluttering this issue. I encountered that error when following the instructions in this section: https://github.com/metabrainz/musicbrainz-docker#set-up-search-indexes (searching for the issue brought me to this thread). If I have further trouble, I'll open a new issue
This section is about setting up search indexes which are used for the website and the API, it’s inapplicable to database-only mirror.
Can you expose a way to modify the SOLR JVM heap memory settings from the docker container? I have 128gb of ram on the machine I run my musicbrainz server, so I have plenty to spare and would like to increase it from 512mb