-
Notifications
You must be signed in to change notification settings - Fork 872
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
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed) #2503
Comments
Same problem. Sometimes builds work just fine in this case. And sometimes they would fail |
We also experience daemon disappearance too often recently when two or more workflows are running in parallel. This is our workflow:
I suspected gradle-build-action in cancelling daemons of neighbour runs, in README they mention:
They must be independent and isolated. And it shouldn't be a memory issue, according to profiling resilts, we have more than enough resources. So, I'm out of ideas. |
Same issue here. |
Hey, it's me again. Found a solution which works in our case. I decided to profile our build locally using
You must find a balance between gradle daemon heap and kotlin compiler daemon heap. gradle + kotlin < 7GB or else Linux will kill gradle daemon. It is important to leave some RAM for Linux or else it'll kill gradle daemon. If you give not enough heap to gradle/kotlin daemons build will fail with OurOfMemoryError. Different technologies and projects may require different heap sizes for gradle and compiler. Unit tests/UI tests require additional kotlin daemon. Our project is relatively big and memory-hungry so we are only able to build artifacts with configs I showed above. So in some cases default build agents may be insufficient for your project. In that case consider paying for stronger agents |
Github action workflow with default runners while building android application getting failed most of the time with below error
Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)
Runner used:
ubuntu-20.04
jvm args: -Xmx5120m -XX:MaxPermSize=4096m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
The text was updated successfully, but these errors were encountered: