Symptoms
- Project settings are stored in the VCS in Kotlin DSL format.
- When the build is started, the
Finalize build settingsstep takes longer than 120 seconds. - The build fails with the
Configs generator runs longer than 120 secondsmessage.
Cause
The error states that the DSL compilation takes longer than 120 seconds, and because of the default timeout, it fails. Large projects may take a considerable amount of time to compile and generate settings. The teamcity-versioned-settings.log file might have some information on what to check.
Resolution
The recommended approach is to identify the cause of a longer project configuration generation.
- If the process takes a long time due to downloading a large number of dependencies, or if the DSL compilation takes the same amount of time when run locally, it may be worthwhile to consider optimizing the code itself.
- If it's significantly faster locally and only slow on the server, it might be worth investigating the cause. For example, a maxed-out CPU during the normal workload and configs generation may be an indicator that the server's hardware is unable to keep up with the load. Documentation provides a general approach to estimating hardware requirements for the TeamCity server.
- Another thing to consider is increasing the amount of memory allocated to the compilation process. By default, the configs generator has only 512 MB of memory available. If the project uses nearly 512 MB of the allocated memory during the compilation, increasing the available memory could resolve this issue. For that, the
teamcity.versionedSettings.configsGeneratorXmxinternal property with a value larger than512mmay be used.
Workaround
teamcity.versionedSettings.configsGeneratorTimeoutSeconds internal property with a value larger than 120 may be used to increase the config generator timeout.
Comments
0 comments
Please sign in to leave a comment.