-
Notifications
You must be signed in to change notification settings - Fork 328
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
OutOfMemoryError: GC overhead limit exceeded during autobuild #2604
Comments
Can you give an example of a project where you're seeing this OOM condition? |
Having tried this locally, I find the max memory pressure from that job is around 3.5GB, which should be achievable on a standard GHA runner. Have you tried the gradle.properties fix suggested? |
Yeah i have tried. But it seems wierd, because I have another project which using more memory, but I did not needed to make any fix as this error suggested. This project using less memory I needed to set 4 gb memory then it ran successfully. Is that something you will look at ? Or.. ? |
Because our current Kotlin extractor runs as a plugin to the Kotlin compiler which is itself managed by Gradle, unfortunately for now we need such memory-usage matters to be addressed at a higher level that isn't in our direct control. We anticipate in the future Kotlin extraction will likely use a different process model at which point we will have greater control over our own operating environment; however, for now I'm afraid it will occasionally be necessary to give Gradle more memory. |
Steps to Reproduce:
Trigger the autobuild process.
Observe the build failure due to OutOfMemoryError.
Expected Behavior:
The build should complete successfully without running out of memory.
Actual Behavior:
The build fails with an OutOfMemoryError.
Suggested Fix:
Increase the memory allocation for the Kotlin daemon in gradle.properties:
kotlin.daemon.jvmargs=-Xmx<size>
Environment:
Kotlin version: 2.0.21
Gradle version: 8.11
Java version: 21
The text was updated successfully, but these errors were encountered: