Config is attached. We have also tried the activemq-scalability.xml with the only change being adding a stomp connector.

Once we hit the memoryUsage limit we can [sometimes] connect new consumers but nothing comes back after we send the SUBSCRIBE frame.

I expect sending to fail when we hit this limit but if we can't subscribe there's no chance of recovering from this state.

Rob Davies wrote:
On 26 Oct 2009, at 17:38, themitchy wrote:

We're using only persistent messages and heap size is set to 2GB yet we hit the memoryUsage limit quite quickly (system usage config below). This is followed by "java.lang.OutOfMemoryError: unable to create new native thread"
as the process quickly reaches the 2GB of heap we gave it.  How are we
getting to that point with the memoryUsage limit set far below it?

Is there no way to get AMQ to gracefully limit it's memory usage?

       <systemUsage>
           <systemUsage>
               <memoryUsage>
                   <memoryUsage limit="256 mb"/>
               </memoryUsage>
               <storeUsage>
                   <storeUsage limit="60 gb" name="foo"/>
               </storeUsage>
               <tempUsage>
                   <tempUsage limit="60 gb"/>
               </tempUsage>
           </systemUsage>
       </systemUsage>

--
View this message in context: 
http://www.nabble.com/Out-of-Memory-on-5.3-tp26064098p26064098.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.



Can you send the rest of your config ?

Rob Davies
http://twitter.com/rajdavies
I work here: http://fusesource.com
My Blog: http://rajdavies.blogspot.com/
I'm writing this: http://www.manning.com/snyder/





<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at
   
    http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<beans
  xmlns="http://www.springframework.org/schema/beans";
  xmlns:amq="http://activemq.apache.org/schema/core";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
  http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd";>

    <!-- Allows us to use system properties as variables in this configuration file -->
    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="locations">
            <value>file:${activemq.base}/conf/credentials.properties</value>
        </property>      
    </bean>

    <!-- 
        The <broker> element is used to configure the ActiveMQ broker. 
    -->
    <broker xmlns="http://activemq.apache.org/schema/core"; brokerName="SophosAMQ_dev" dataDirectory="${activemq.base}/data">
        
        <!-- 
            The managementContext is used to configure how ActiveMQ is exposed in 
            JMX. By default, ActiveMQ uses the MBean server that is started by 
            the JVM. For more information, see: 
            
            http://activemq.apache.org/jmx.html 
        -->
        <managementContext>
            <managementContext createConnector="true"/>
        </managementContext>

        <!-- 
            Configure message persistence for the broker. The default persistence
            mechanism is the KahaDB store (identified by the kahaDB tag). 
            For more information, see: 
            
            http://activemq.apache.org/persistence.html 
        -->
        <persistenceAdapter>
            <kahaDB directory="${activemq.base}/data/kahadb"/>
        </persistenceAdapter>

        
        <systemUsage>
            <systemUsage>
                <memoryUsage>
                    <memoryUsage limit="256 mb"/>
                </memoryUsage>
                <storeUsage>
                    <storeUsage limit="60 gb" name="foo"/>
                </storeUsage>
                <tempUsage>
                    <tempUsage limit="60 gb"/>
                </tempUsage>
            </systemUsage>
        </systemUsage>

        <!-- The store and forward broker networks ActiveMQ will listen to -->
        <networkConnectors>
            <!-- by default just auto discover the other brokers -->
            <!-- <networkConnector name="default-nc" duplex="true" uri="multicast://default?group=sophos-broker-dev"/> -->
            <!-- Example of a static configuration:
            <networkConnector name="host1 and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
            -->
        </networkConnectors>
		  
        <!-- 
            The transport connectors expose ActiveMQ over a given protocol to
            clients and other brokers. For more information, see: 
            
            http://activemq.apache.org/configuring-transports.html 
        -->
        <transportConnectors>
            <transportConnector name="openwire" uri="tcp://0.0.0.0:61616" discoveryUri="multicast://default?group=sophos-broker-dev"/>
            <transportConnector name="stomp" uri="stomp+nio://0.0.0.0:61613?transport.closeAsync=false" discoveryUri="multicast://default?group=sophos-stomp-dev"/>
        </transportConnectors>

    </broker>
<!--
    <import resource="camel.xml"/>
    -->

    <!-- 
        Enable web consoles, REST and Ajax APIs and demos
        Take a look at activemq-jetty.xml for more details 
    -->
    <import resource="jetty.xml"/>
    
</beans>

Reply via email to