Open rwarren opened 6 years ago
The docker-compose.yml needs to be adjusted. You need to specify _CATALINAPARAMETER1, _CATALINA_PARAMETERVALUE1, and so on to set the _CATALINAOPTS.
For Jira it's _JVM_MINIMUMMEMORY and _JVM_MAXIMUMMEMORY.
The default configuration if you don't specify additional environment variables:
Product | Java VM Settings |
---|---|
Confluence | -Xmx1024m -Xms1024m |
Jira | -Xms384m -Xmx768m |
Jira Image is configured differently. This changed recently: https://github.com/blacklabelops/jira#a-word-about-memory-usage
I'm confused.
JVM_xxx_MEMORY
settings a replacement for CATALINA_OPTS
or in addition to CATALINA_OPTS
?Also, per the original reason for this issue, their docs still say to set the min and max the same.
To cover off possible versioning issues, is this how the environment section should look like for these vars in the docker compose file?
environment:
JIRA_DATABASE_URL: <snip>
JIRA_DB_PASSWORD: <snip>
CATALINA_OPTS: -Xms1024m -Xmx1024m
JVM_MINIMUM_MEMORY: 1024m
JVM_MAXIMUM_MEMORY: 1024m
Looks like Jira uses the JAVA_OPTS environment variable. You can check this in /opt/jira/bin/setenv.sh in the Docker container.
You need to specify:
environment:
JIRA_DATABASE_URL: <snip>
JIRA_DB_PASSWORD: <snip>
SETENV_JVM_MINIMUM_MEMORY: 1024m
SETENV_JVM_MAXIMUM_MEMORY: 1024m
The docker-entrypoint script uses the environment variables you specify in the Docker compose file to configure the variables in setenv.sh for Confluence/Jira.
According to Atlassian documentation they changed the memory configuration also for Confluence: https://confluence.atlassian.com/confkb/how-to-fix-out-of-memory-errors-by-increasing-available-memory-154071.html
Can somebody check if either CATALINA_OPTS or JVM_MINIMUM_MEMORY, JVM_MAXIMUM_MEMORY still works? Maybe we will need an issue here.
The Confluence image is fine. -Xmx1024m, -Xms1024m, and -XX:+UseG1GC are still configured via _CATALINAOPTS in /opt/atlassian/confluence/bin/setenv.sh. -XX:MaxPermSize is not set at all.
Thank you!
The current blacklabelops
docker-compose.yaml
Java VM settings are as follows:The Atlassian recommendations on this page state:
So it seems that this should be changed to:
Same applies to the JIRA config... although (for JIRA) I do wonder at the blacklabelops default Xmx value of 1 GB, when the general guidance from Atlassian themselves is:
Bumping to 1 GB seems reasonable to me, but... Java isn't my thing (thankfully) and I'm wary of direct guidance saying not to allocate too much!