質問

使用:HornetQは2.0.0.CR2を スタンドアロン/非クラスタ化されたサーバーのデフォルト設定ます。

私は大きなジャーナル(> 1GBの)を使用してサーバを起動しようとすると、

、私はのOutOfMemory例外が発生しました。

[main] 12:59:43,505 INFO [org.hornetq.integration.bootstrap.HornetQBootstrapServer]  Starting HornetQ Server
[main] 12:59:44,526 INFO [org.hornetq.core.server.impl.HornetQServerImpl]  live server is starting..
[main] 12:59:44,532 WARNING [org.hornetq.core.server.management.impl.ManagementServiceImpl]  It has been detected that the cluster admin user and password which are used to replicate management operation from one node to the other have not been changed from the installation default. Please see the HornetQ user guide for instructions on how to do this.
[main] 12:59:44,564 WARNING [org.hornetq.core.persistence.impl.journal.JournalStorageManager]  AIO wasn't located on this platform, it will fall back to using pure Java NIO. If your platform is Linux, install LibAIO to enable the AIO journal
[main] 12:59:44,565 INFO [org.hornetq.core.persistence.impl.journal.JournalStorageManager]  Using NIO Journal
Exception in thread "hornetq-expiry-reaper-thread" java.lang.OutOfMemoryError: GC overhead limit exceeded
at java.util.concurrent.ConcurrentHashMap.values(ConcurrentHashMap.java:1011)
at org.hornetq.core.postoffice.impl.PostOfficeImpl$Reaper.run(PostOfficeImpl.java:1083)
at java.lang.Thread.run(Thread.java:637)
[main] 13:00:17,135 SEVERE [org.hornetq.integration.bootstrap.HornetQBootstrapServer]  Failed to start server
java.lang.IllegalStateException: Incompletely deployed:

DEPLOYMENTS IN ERROR:
  Deployment "JMSServerManager" is in error due to: java.lang.OutOfMemoryError: GC overhead limit exceeded

at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:278)
at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:174)
at org.hornetq.integration.bootstrap.HornetQBootstrapServer.bootstrap(HornetQBootstrapServer.java:159)
at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:83)
at org.hornetq.integration.bootstrap.HornetQBootstrapServer.run(HornetQBootstrapServer.java:117)
at org.hornetq.integration.bootstrap.HornetQBootstrapServer.main(HornetQBootstrapServer.java:73)
Exception in thread "main" java.lang.IllegalStateException: Incompletely deployed:

DEPLOYMENTS IN ERROR:
  Deployment "JMSServerManager" is in error due to: java.lang.OutOfMemoryError: GC overhead limit exceeded

at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.internalValidate(AbstractKernelDeployer.java:278)
at org.jboss.kernel.plugins.deployment.AbstractKernelDeployer.validate(AbstractKernelDeployer.java:174)
at org.hornetq.integration.bootstrap.HornetQBootstrapServer.bootstrap(HornetQBootstrapServer.java:159)
at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:83)
at org.hornetq.integration.bootstrap.HornetQBootstrapServer.run(HornetQBootstrapServer.java:117)
at org.hornetq.integration.bootstrap.HornetQBootstrapServer.main(HornetQBootstrapServer.java:73)

消費者がメッセージの処理を停止し、私は、サーバーを再起動する必要がある場合には、実際の生活の中で起こる可能性があります。

このため任意の回避策はありますか?またはその構成私は変更しようとするでしょうか?

役に立ちましたか?

解決

<のp>完全にこの問題を回避するために簡単だったが判明します。

ページングする のそれは、デフォルトの設定で有効になっていない!

トリックを行う必要がありますHornetQは、configuration.xmlの上でこれらの2行を追加します:

   <address-settings>
      <!--default for catch all-->
      <address-setting match="#">
         <dead-letter-address>jms.queue.DLQ</dead-letter-address>
         <expiry-address>jms.queue.ExpiryQueue</expiry-address>
         <redelivery-delay>0</redelivery-delay>
         <page-size-bytes>10485760</page-size-bytes>
         <message-counter-history-day-limit>10</message-counter-history-day-limit>

         <!-- Add these 2 lines -->
         <max-size-bytes>104857600</max-size-bytes>
         <address-full-policy>PAGE</address-full-policy>

      </address-setting>
   </address-settings>

今では、処理されるのを待っている巨大なキューを持つことが可能です。

他のヒント

ここから、それはあなたが表示されますをヒープが小さすぎます。

  

平行コレクタがスローされ   OutOfMemoryErrorがあまりにも多くの時間がある場合   ガベージコレクションに費やされている:場合   合計時間の98%以上であります   ガベージコレクションと少ないに費やさ   ヒープの2%が回収されるよりも、   OutOfMemoryErrorがスローされます。この   機能は防ぐように設計されて   以下のために実行したアプリケーション   長時間ながら   ヒープので、ほとんど、あるいはまったく進展   小さすぎる。必要であれば、この   機能は追加することによって無効にすることができます   オプション-XX:へ-UseGCOverheadLimit   コマンドラインます。

あなたがJVMのメモリオプションを変更しようとしている、特に-Xmx(最大メモリ割り当て可能)!私はあなたがそれをあなたのメッセージを処理するのに十分なヘッドルームを与えるために、あなたのJVMの最大メモリーを増やす必要がある疑います。

それは開発者の上にある場合は、

あなたは単にあなたのHornetQの作業ディレクトリ(例えば〜/仕事/ HornetQの)を削除することによって、あなたのキューをドロップすることができます。

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top