Gradle build daemon disappeared unexpectedly - React Native

Hi All,

I am struggling on this issue from past 3 days. I use react-native on android. Everything was fine until I ugraded to latest version (0.59). The build keeps failing with “Gradle build daemon disappeared unexpectedly” error on Circle CI. It works fine on local.

I know its a memory issue and have tried multiple ways to set the java opts and stuff.

      _JAVA_OPTIONS: '-Xms512m -Xmx3g'
      GRADLE_OPTS: '-Xmx3g -Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-Xmx3g -XX:+HeapDumpOnOutOfMemoryError"'

Also tried with setting in None of it is working.

Any help will be welcome.

Hello @HannanShaikYara

With any Android build (especially react-native), it is very common to require more than 4Gb of memory. If you are on the performance plan already you can enable a higher resource class now and give it a shot:

If you are on the container plan at the moment or are just curious how much memory your job is using when it fails, send us a support ticket and we’ll be happy to take a look:

P.S. please run a fresh build and attach to the ticket.