DSL documentation generation failed - OutOfMemoryError

Hi folks!

 

I've just installed TeamCity on a DigitalOcean droplet (with 4GB of RAM + 8GB of swap) inside a docker container.

 

The whole thing just works, but after a restart, I see the CPU get stuck in 100% (with the memory usage never going above 2GB) until it ends up throwing this:

 

teamcity_1  | [2018-12-22 14:37:48,231]   WARN - r.configs.dsl.DslPluginManager - DSL documentation generation failed

teamcity_1  | exit code: 1

teamcity_1  | stderr: Picked up JAVA_TOOL_OPTIONS: -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap

teamcity_1  | Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

 

It's erroring on a call similar to this one:

 

/opt/java/openjdk/jre/bin/java -Xmx512m -cp /opt/teamcity/webapps/ROOT/WEB-INF/plugins/.unpacked/configs-dsl/dokka/dokka-fatjar-0.9.15.jar org.jetbrains.dokka.MainKt -output /opt/teamcity/temp/dslPluginsDoc4096403338974359149dir -format html -packageOptions jetbrains.buildServer,-warnUndocumented -cacheRoot /opt/teamcity/temp/dokka2087736397715398231cache -include /opt/teamcity/temp/KotlinDSL2987884695142819176.md -links http://docs.oracle.com/javase/6/docs/api/^/opt/teamcity/webapps/ROOT/WEB-INF/plugins/.unpacked/configs-dsl/server/package-lists/java^^https://kotlinlang.org/api/latest/jvm/stdlib/^/opt/teamcity/webapps/ROOT/WEB-INF/plugins/.unpacked/configs-dsl/server/package-lists/kotlin /opt/teamcity/webapps/ROOT/WEB-INF/plugins/.unpacked/configs-dsl/server/configs-dsl-src /opt/teamcity/temp/genKotlin8629786587319887788dir 

and the issue seems to be that it's passing -Xmx512m... but I can't figure out where it's calling that or how to affect it (TEAMCITY_SERVER_MEM_OPTS doesn't make a difference)

 

Thanks!

1 comment

Oleg Rybak pointed me to the answer... you can change the memory size for the DSL documentation generation by setting the internal property teamcity.kotlinConfigsDsl.docsGenerationXmx... so adding this fixed it for me:

teamcity.kotlinConfigsDsl.docsGenerationXmx=768m

0

Please sign in to leave a comment.