Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java OOM instructions are unclear #2944

Closed
dwmkerr opened this issue Nov 22, 2018 · 1 comment
Closed

Java OOM instructions are unclear #2944

dwmkerr opened this issue Nov 22, 2018 · 1 comment
Assignees

Comments

@dwmkerr
Copy link

dwmkerr commented Nov 22, 2018

Missing Information

There is substantial documentation on the different environment variables available for Java memory usage. However, there is no suggested variable to use as a 'best choice' for projects.

Already Looked

Suggestion

I would suggest that we add more into the docs, such as:

Android Projects

In most cases, gradle build out-of-memory errors will be resolved with:

environment:
  JAVA_OPTS: "-Xms512m -Xmx1024m"
  _JAVA_OPTIONS: "-XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap"
  GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'

I think this would be really useful because I cannot actually find suggested settings anywhere and it's still totally hit and miss for me what might actually work!

@teesloane teesloane self-assigned this Nov 30, 2018
@teesloane
Copy link
Contributor

Hi @dwmkerr. Thanks for opening this ticket.

It's true that there are a lot of different environment variables regarding memory usage in Java, and it's not immediately clear what will work for a user. Unfortunately, however, how a user will need to fine tune the JVM and memory usage is going to vary quite a bit from project to project (and from build target to target aswell) so it's unlikely that we'll have a "one size fits all" example that we can provide.

However! It might be of some use to open a topic in the CircleCI discuss forum, where other users could weigh in on commonly used settings. None the less, I'm glad you posted this issue so that it will be accessible to user's who might be looking for a place to start with customizing their memory options. I'll be closing the issue but it will still be discoverable.

Hope that helps, and thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants