2009-12-21 4 views
3

사용 : HornetQ 2.0.0.CR2 독립 실행 형/클러스터되지 않은 서버의 기본 구성. 큰 저널 시작시 HornetQ OutOfMemory

내가 큰 저널 (>의 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) 

소비자가 메시지 처리를 중지 할 때 실제 생활에서 일어날 수를 내가 필요 서버를 다시 시작하십시오.

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

+2

HornetQ 메일 링리스트 (http://www.jboss.org/hornetq/community.html)는 현재 1.0 버전으로 출시되기 때문에 매우 활발합니다. 문제가 있다고 의심되면 지금 신고하십시오. – skaffman

답변

5

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

Paging 기본 구성에서는 사용할 수 없습니다.

트릭을 할해야 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> 

를 지금은 처리 대기 엄청난 대기열이 가능합니다.

0

here에서 힙이 너무 작게 나타납니다.

The parallel collector will throw an OutOfMemoryError if too much time is being spent in garbage collection: if more than 98% of the total time is spent in garbage collection and less than 2% of the heap is recovered, an OutOfMemoryError will be thrown. This feature is designed to prevent applications from running for an extended period of time while making little or no progress because the heap is too small. If necessary, this feature can be disabled by adding the option -XX:-UseGCOverheadLimit to the command line.

당신이 당신의 JVM 메모리 옵션을 수정 시도했다 특히 -Xmx (최대 메모리 할당 가능)? 메시지 처리를위한 충분한 헤드 룸을 제공하기 위해 JVM 최대 메모리를 늘려야 할 것으로 판단됩니다.

+0

서버에서 -Xmx2048m을 사용하고 있는데이 예외가 계속 발생합니다. 서버는 32 비트이므로 더 이상 갈 수 없습니다. –

+0

그리고 GCOverheadLimit 검사를 사용하지 않으면? –

+0

도움이되지 않습니다. "배포"JMSServerManager "가 다음 오류로 인해 오류가 발생합니다. java.lang.OutOfMemoryError : Java 힙 공간" –

0

개발자의 경우 HornetQ 작업 디렉토리 (예 : ~/work/hornetq)를 삭제하여 대기열을 삭제하면됩니다.