LoginSignup
1
0

More than 5 years have passed since last update.

WebArena suitePro V3 で play framework を動かす

Last updated at Posted at 2012-12-26

jvmがserverモードで動いている場合、jvmはメモリを最大限取得しようとするが、VPSの場合にはそれが許されていないため

# play
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

というエラーメッセージが出てしまう。

-clientモードに変更すると、2分の1くらいに速度が遅くなるという情報もあったため、

export _JAVA_LAUNCHER_DEBUG=1

で、デバッグ情報を見つつ、

 export _JAVA_OPTIONS='-Xmx512m'

と指定をしたら、正しく動作した。

play/frameworks/build.bat
などの設定を変えただけでは、全java実行のオプションを指定できないからだろうか。

追記(2012/06/10)

更に開発を進めていくと

play.api.UnexpectedException: Unexpected exception [IOException: Cannot run program "javac": java.io.IOException: error=12, Cannot allocate memory]

というエラーが出て、playコマンドの実行はできるが、その先のcompileが実行できない、という状況に陥った。
ひとまずの解決策として、

export _JAVA_OPTIONS='-Xmx256m -Xms256m'

としたら、コンパイルも可能となった。
メモリが2GBプランなので、起動はできてもコンパイル時にメモリ不足となるのだろうか。。。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0