【发布时间】:2012-11-06 11:39:13
【问题描述】:
我正在尝试将简单的 Playframework Scala 应用程序部署到 AppFog。我创建了新的 Scala 应用程序并从 AppFog documentation 添加了一个 JAR。然后我按照deploying to AppFog guide 的步骤进行操作。
问题是当保留的内存少于 900MB 时,应用程序将无法启动。错误是:
Error: Application [pralab-test] failed to start, logs information below.
====> /logs/stdout.log <====
No database found in Play configuration. Skipping auto-reconfiguration.
Play server process ID is 13276
[‹[33mwarn‹[0m] play - Plugin [org.cloudfoundry.reconfiguration.play.JPAPlugin]
is disabled
[‹[37minfo‹[0m] play - Application started (Prod)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# pthread_getattr_np
# An error report file with more information is saved as:
# /mnt/var/vcap.local/dea/apps/pralab-test-0-d6bc1b644e85148149d759499e02b409/ap
p/hs_err_pid13276.log
当启动更多内存时,应用程序启动并仅使用声明的 900MB 中的大约 140MB。是Play的启动内存峰值还是AppFog有bug?
你们有在 AppFog 上成功部署 Play 应用的吗?
编辑 这在具有 256M 内存的 cloudfoundry.com 上运行良好。
【问题讨论】:
-
我猜这里的问题与 JVM 堆大小有关(也许 cloudfoundry.com 使用不同的默认值)。但是,受stackoverflow.com/questions/6763453/… 启发,我尝试设置 Java 选项,即设置 _JAVA_OPTIONS 的值以指定较小的堆大小,在我的本地计算机上有效,但在我上传到 AppFog 时无效。
标签: deployment playframework cloud playframework-2.0 appfog