2012-04-06 18 views
0

私たちは、Elastic Beanstalkに最小インスタンス数1、最大インスタンス数2のJava Webアプリケーションを自動スケーリング用にデプロイしました。私たちが使用しているカスタムAMIは、Sun JDK 6のc1.mediumです。AWS Elastic Beanstalkのコンテナオプション

環境ステータスが黄色に変わり、赤色に変わりました。スナップショット・ログからログ・ファイルを調べたところ、例外が見つかりました。原因はjava.lang.OutOfMemoryError:Javaヒープ・スペースです。これが環境破壊の可能性のある理由の1つであると仮定します。 256M

最大JVMヒープサイズ(MB) - - 512メートル 最大ヒープサイズJava仮想マシンがこれまでになります私たちは環境のコンテナオプションで設定した 設定が

初期JVMヒープサイズ(MB)です-Xmxを使用してJVMの起動コマンドラインで指定されています。

最大JVM Permanent世代サイズ(MB) - 512メートル

iはより512メートルからのヒープサイズを増やす必要がありますか、それは大丈夫です。

答えて

1

あなたの最大JVM永続世代サイズが大きすぎると思います。ここdocumentation of AWSは次のとおりです。

JVM Options

The heap size in the Java Virtual Machine affects how many objects can be created in memory before garbage collection—a process of managing your application’s memory—occurs. You can specify an initial heap size and a maximum heap size. A larger initial heap size allows more objects to be created before garbage collection occurs, but it also means that the garbage collector will take longer to compact the heap. The maximum heap size specifies the maximum amount of memory the JVM can allocate when expanding the heap during heavy activity.

In the Edit Configuration window, you can set the initial and the maximum JVM heap sizes using the Initial JVM Heap Size (MB) and Maximum JVM Heap Size (MB) boxes. The available memory is dependent on the Amazon EC2 instance type. For more information about the Amazon EC2 instance types available for your AWS Elastic Beanstalk environment, go to Instance Families and Types in the Amazon EC2 User Guide.

The permanent generation is a section of the JVM heap that is used to store class definitions and associated metadata. To modify the size of the permanent generation, type the new size in the Maximum JVM Permanent Generation Size (MB) box

私はXmxの設定を説明する中で、このRimuhosting how-to articleはかなり良い見つけます。

関連する問題