문제

사용 : Hornetq 2.0.0.cr2 독립형/비 클러스터 서버의 기본 구성.

큰 저널 (> 1GB)으로 서버를 시작하려고 할 때는 아웃 시간 예외를 얻었습니다.

[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)

소비자가 메시지 처리를 중단하고 서버를 다시 시작해야 할 때 실제 생활에서 발생할 수 있습니다.

이것에 대한 해결 방법이 있습니까? 또는 어떤 구성을 수정해야합니까?

도움이 되었습니까?

해결책

이 문제를 완전히 피하는 것이 간단하다는 것이 밝혀졌습니다.

그만큼 페이징 기본 구성에서는 활성화되지 않습니다!

Hornetq-configuration.xml 에이 두 줄을 추가하면 다음과 같이해야합니다.

   <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>

이제 처리되기를 기다리는 엄청난 대기열이있을 수 있습니다.

다른 팁

에서 여기 힙이 너무 작은 것 같습니다.

가비지 수집에 너무 많은 시간이 소비되면 평행 수집기가 외부 모성을 던질 것입니다. 총 시간의 98% 이상이 쓰레기 수집에 소비되고 힙의 2% 미만이 회수되면 외부 모성 오류가 발생됩니다. 이 기능은 힙이 너무 작기 때문에 응용 프로그램이 장시간 실행되는 것을 방지하면서 장기간 실행되는 것을 방지하도록 설계되었습니다. 필요한 경우 옵션 -xx : -usegcoverheadlimit를 명령 줄에 추가 하여이 기능을 비활성화 할 수 있습니다.

JVM 메모리 옵션을 수정 해보고 -Xmx (Max Memory 할당 가능) 특히? JVM Max 메모리를 늘려 메시지를 처리하기에 충분한 헤드 룸을 제공해야한다고 생각합니다.

개발자의 경우 Hornetq Work 디렉토리 (예 : ~/work/hornetq)를 삭제하여 큐를 떨어 뜨릴 수 있습니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top