Closed elect86 closed 1 year ago
@GlenKPeterson is gradle.properties.kts
a thing? Shouldn't it be just plain gradle.properties
?
## gradle.properties
org.gradle.jvmargs=-XX:MaxMetaspaceSize=2G
If you're not using samples, you should not experience any major leaks. If it's an open source project, I can have a look, but if it's closed source, there's little I can do.
Try increasing metaspace and have a look at the Metaspace Graph in VisualVM. You should see the saw-like pattern just like in the screenshot above. If it only goes up and never down, try pressing Perform GC
button, it should stall for a few seconds and then drop down. If it doesn't happen, there might be a leak. Generally any info that you can gather would be useful, we'd like to get this fixed if it's a leak.
If you need help or have questions, feel free to reach out to me at ignat.beresnev@jetbrains.com
or by messaging me in the Kotlin Community Slack (same name there)
I was just clearing large files out of my drive and found more data for you. I still get this issue from time to time. After looking at this briefly, I wonder if I'm using too many links in my KotlinDocs? Or linking to the Java or Kotlin documentation on the web too often? I have a vague recollection of using a compile parameter to specify which version of the standard library documentation to link to, but don't remember if that's for this project or not.
I am working on a replacement for the Dokka Gradle Plugin, https://github.com/adamko-dev/dokkatoo, which uses the Gradle Worker API to run Dokka in an isolated process.
I had hoped that running Dokka in an isolated daemon would help, especially as Gradle should re-use the daemon, but unfortunately it hasn't helped, and anecdotally OOM errors seem to be triggered more often for even the basic examples andintegration-test projects.
Here is an example failure: https://github.com/adamko-dev/dokkatoo/actions/runs/4211535460/jobs/7310041760
Since I have set up Dokka to run in a separate process it should be possible to analyze the process independently of other work. I will see if I can set this up, but if anyone would like to try, please check out the project and run the tests, and hints or tips would be appreciated!
We've fixed all known Metaspace leaks as of today, and added some tests to detect such problems in the future. Unfortunately, Dokka still requires a considerable amount of memory to document large projects.
If you are experiencing Metaspace-related issues when running Dokka:
-XX:MaxMetaspaceSize=2G
) as the defaults can be modest. The larger the project, the more you might need to allocate.If you you have suspicions that Dokka is leaking memory or the Metaspace size you've set goes beyound reasonable, please create a separate issue for your case. We would appreciate having a reproducer and as much information as possible to collect.
I'm closing this general issue so that we can concentrate on specific cases.
Question
I added the following in my
build.gradle.kts
However
dokkaJavadocJar
produces the titled error:and the following
But I'm pretty sure is
dokkaJavadocJar
the error root because if I comment it out, it works flawlessIn order to fix this, I added in
gradle.properties
Installation
I wonder if this is "fine" or something nasty is happening in the background I shall be aware of
Ps: the very same problem happens also in other projects