Grails task fails in Bamboo build - OutOfMemoryError

プラットフォームについて: Data Center のみ。 - This article only applies to Atlassian apps on the Data Center プラットフォーム

この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。 Server* 製品のサポートは 2024 年 2 月 15 日に終了しました。Server 製品を実行している場合は、 アトラシアン Server サポート終了 のお知らせにアクセスして、移行オプションを確認してください。

*Fisheye および Crucible は除く

症状

Grails task fails when running a Bamboo build, and this error is in the build logs:

build 19-Aug-2013 14:51:45 | Packaging Grails application..... build 19-Aug-2013 14:51:57 | Tests FAILED - view reports in /mnt/bamboo5/xml-data/build-dir/PROJ1-WEB-JOB1/target/test-reports build 19-Aug-2013 14:51:58 | Error Error executing script TestApp: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'syncTriggerTrigger': ... Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quartzScheduler': Invocation of init method failed; nested exception is java.lang.OutOfMemoryError: unable to create new native thread (Use --stacktrace to see the full trace) simple 19-Aug-2013 14:51:58 Failing task since return code of [/opt/grails/bin/grails test-app -non-interactive] was 1 while expected 0 ...

原因

Lack of memory for the Grails build or for the VM (if one is being used).

ソリューション

Seeing OutOfMemoryError in the logs recommends increasing the heap for the Grails task. Please try to use this option (as it's mentioned here) in the Environment Variables field to increase the heap of the of the Grails task:

GRAILS_OPTS="-Xmx512M"

Alternatively, if you are running your build in a virtual environment, make sure that there is enough memory allocated to the VM.

更新日時: September 25, 2025

さらにヘルプが必要ですか?

アトラシアン コミュニティをご利用ください。