-
Notifications
You must be signed in to change notification settings - Fork 8
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
How to fix OOM #168
Comments
hey @CLOVIS-AI 👋. Unfortunately Dokka is quite memory intensive, depending on the project. How many subprojects do you have? Are there a lot of dependencies? Specifying memory optionsChanging the JVM memory args is different depending on your version of Dokkatoo. v2.0.0The memory for the worker process can be specified in the tasks: // build.gradle.kts
tasks.withType<DokkatooGenerateTask>.configureEach {
workerMinHeapSize.set("512m")
workerMaxHeapSize.set("2g")
} v2.1.0In v2.1.0 the options have been changed a bit. You can choose run Dokka in the same Gradle process, so if you increase the memory for a Gradle build (set // build.gradle.kts
dokkatoo {
// run Dokka Generator in the current Gradle build process
dokkaGeneratorIsolation.set(
ClassLoaderIsolation()
)
} Alternatively, you can continue to use a separate process for Dokka, and specify the memory in the buildscript DSL: // build.gradle.kts
dokkatoo {
dokkaGeneratorIsolation.set(
ProcessIsolation {
debug.set(false)
enableAssertions.set(true)
minHeapSize.set("512m")
maxHeapSize.set("1g")
// ...
}
)
} RecommendationsI am not an expert at all when it comes to Java memory usage or tuning!
|
I have vague plans to create the documentation more thorough, and JVM args, particularly memory settings, would be a thing good to document. |
Do you know if it would be possible to display the Dokka memory usage in a build scan? The memory usage for the Gradle daemon itself is included, I'm not sure if it's possible to add that information. |
I have no idea, but I think it's a good feature request for Gradle Build Scans! |
Well, the great news is updating to Dokkatoo 2.1.0 fixed the OOM. Still no idea what it was caused by, but it's not that important now. Please ping me if this info ever becomes available in logs/build scans :) I don't know your workflow with issues, but I got all the info I needed, so I think this can be closed? |
Good to hear! I'm happy to leave this open for now in lieu of writing proper documentation. I've also been wondering about instrumenting Dokka Generator and figuring out some statistics. It should be possible to inject OpenTelemetry automatically. Though I'm not sure if there's a nice way to view the metrics. It would be nice to be able to do so without spinning up Prometheus and Grafana. |
Hi!
I'm using the version 2.0.0. In CI, I'm seeing:
How much memory should I configure? How can I configure it?
The text was updated successfully, but these errors were encountered: