Java build out of memory

We are scanning our largest repo GitHub - odpi/egeria: Egeria core

I’ve noticed incomplete build results, and on checking the log see that the build does not complete with:

Caused by: java.lang.OutOfMemoryError: Java heap space

In our lift.toml we currently only have:

 jdkVersion = "17"
 build = "./gradlew -x test -x javadoc  build"

In our gradle.properties
org.gradle.jvmargs=-Xmx4096m

I’ve not seen issues elsewhere.

What are the memory limits for the sonatype scan?

1 Like

Hi Nigel,
Sorry to hear that it’s not working. The build environment has enough memory to support your build settings. We believe this is a bug in one of the Gradle APIs we use to get the dependencies. We’re looking into some solutions that will allow us to workaround this current issue. I’ll post an update when I have better information from the team.

  • Matt
1 Like

Thanks for the quick update

Hi,
I wondered if you had any further ideas on this. Though I’ve not looked closely, the build continues to fail ie https://lift.sonatype.com/results/github.com/odpi/egeria/01GYTVBR13TRASR8HJ51PNFV3K?tab=logs

The current failure is:
Compilation database generation failed: Failure {failureType = “CompDBError”, failureMessage = “Execution Failed: Script "/tmp/analyzing-a46c50471c17beb2/gradlew -q -I /tmp/analyzing-a46c50471c17beb2/muse-compdb.gradle -x test -x javadoc build" exited with code 1.”, failureActionableInformation = Just “Failed to generate compilation database. This was likely caused by a build error. Check and make sure that your project builds in a clean environment and file a bug at https://community.sonatype.com/c/sonatype-lift/50 if the problem persists.”, solverName = Nothing, hostName = Nothing, httpCode = Nothing}

So it may not be memory – nor clear on what I should try to fix it.