-
Notifications
You must be signed in to change notification settings - Fork 13
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
Android builds sometimes fail with apparent OOM #418
Comments
For reference, here is a link to a failed pipeline run: |
I just found the following:
(See here.) That same page includes the following:
Between these two statements, it certainly seems that setting GRADLE_OPTS like we do in our yml script has no effect on the build memory. I know that display-test-app has the following in its gradle.properties:
The web page does in another section say that JAVA_OPTS can be used to configure the VM memory settings when the Gradle Daemon is deactivated. Since our command line does include --no-daemon, does that perhaps mean that GRADLE_OPTS will work? @swbsi, what do you think? |
I also see that -Xms sets the initial pool size, while -Xmx sets the max. So if the problem is that the machine doesn't have enough virtual memory available, omitting -Xms would fix that as long as it has enough virtual memory as is actually needed. |
I created a PR in bsicommon to only set the max heap size, not the initial heap size (going on the assumption that the GRADLE_OPTS environment variable does in fact do what we want when using --no-daemon). I'm not sure how to test the change. |
@tcobbs-bentley can you link to that PR? Are you still blocked? This is still breaking builds. |
@pmconne The PR is here: https://dev.azure.com/bentleycs/iModelTechnologies/_git/bsicommon-imt/pullrequest/360429 Since we weren't sure whether we weren't allocating enough or requiring too much, that PR simply got rid of the minimum allocation. I'll submit another PR to increase the max allocation. |
Here is a PR to double Gradle's maximum heap size to 8GB: https://dev.azure.com/bentleycs/iModelTechnologies/_git/bsicommon-imt/pullrequest/367245 |
@pmconne Has it failed since my last PR above? |
Not that I have observed. |
Execution failed for task ':app:mergeReleaseNativeDebugMetadata'.
The text was updated successfully, but these errors were encountered: