Skip to content

Build failed: Unrecognized VM option 'UseCGroupMemoryLimitForHeap' #120

@duailibe

Description

@duailibe

Orb version: 5.6.0

What happened

The build failed with the following error (in "Downloading Gradle Dependencies"):

Picked up _JAVA_OPTIONS: -Xmx2g -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
Unrecognized VM option 'UseCGroupMemoryLimitForHeap'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Exited with code exit status 1

I noticed this orb uses a non-pinned image of react-native-community/react-native, and that image was updated last week to use JDK 11 which completely removes the UseCGroupMemoryLimitForHeap option.

I'm not that familiar with JVM options so I just changed config.yml to pass java_options without that flag and the build succeeded. Moving forward I found this article which might help decide with the defaults should be.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions