activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From christyc <ca...@avaya.com>
Subject Getting OutOfMemoryError: Java heap space
Date Thu, 13 Jul 2006 20:36:48 GMT

Maybe this is obvious, but I've been scouring the forum and website and am
thinking that we have a configuration problem (hopefully) and not a bug. 
Anyway, we have multiple users as publishers and am trying to test the
persistentence capability by not having any consumers consume messages.  We
have some requirements that 1 million messages must be persisted and in our
current test, we generate up to 400k messages and then get OutOfMemoryError
: Java heap space coming from ActiveMQ.  From what I see on the website,
having topics that are durable should be persisted to the database and
spooled to disk.  We pretty much are using the out of a box activemq.xml
configuration, but I don't see derby directories or the journal directories
getting touched.  It seems like we don't have the derby database configured
correctly.  We are using durable topics with asynch sending and memory
management is set to 0 (which I thought I  picked up as being unlimited). 
How can you verify that the data is being spooled to disk and derby?  Here's
our activemq.xml:

 <beans xmlns="http://activemq.org/config/1.0">

    <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>

    <broker persistent="true" useJmx="true">

    <!--  Use the following to set the broker memory limit (in bytes) -->
    <memoryManager>
        <usageManager id="memory-manager" limit="0"/>
    </memoryManager>

    <!-- In ActiveMQ 4, you can setup destination policies -->
    <destinationPolicy>
      <policyMap><policyEntries>
           <policyEntry topic="FOO.>">
            <dispatchPolicy>
              <strictOrderDispatchPolicy />
            </dispatchPolicy>
            <subscriptionRecoveryPolicy>
              <lastImageSubscriptionRecoveryPolicy />
            </subscriptionRecoveryPolicy>
          </policyEntry>

          <policyEntry topic="com.avaya.coreservice.management.TESTTOPIC">
            <dispatchPolicy>
               <strictOrderDispatchPolicy />
            </dispatchPolicy>
            <subscriptionRecoveryPolicy>
               <!--<timedSubscriptionRecoveryPolicy
recoverDuration="60000"/>-->
                <fixedCountSubscriptionRecoveryPolicy
maximumSize="1000000"/>

            </subscriptionRecoveryPolicy>

            <pendingMessageLimitStrategy>
               <constantPendingMessageLimitStrategy limit="1000000"/>
                                                                                         
         
</pendingMessageLimitStrategy>
          </policyEntry>

      </policyEntries></policyMap>
    </destinationPolicy>

    <persistenceAdapter>
          <journaledJDBC journalLogFiles="5"
dataDirectory="${activemq.home}/activemq-data" />
                                                                                         
 
    </persistenceAdapter>

    <transportConnectors>
       <transportConnector name="default" uri="tcp://localhost:61616"
discoveryUri="multicast://default"/>
       <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
    </transportConnectors>

    <networkConnectors>
      <!-- by default just auto discover the other brokers -->
      <networkConnector name="default" uri="multicast://default"/>
        </networkConnectors>

  </broker>
</beans>

-- 
View this message in context: http://www.nabble.com/Getting-OutOfMemoryError%3A-Java-heap-space-tf1939814.html#a5316267
Sent from the ActiveMQ - User forum at Nabble.com.


Mime
View raw message