activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Posta <christian.po...@gmail.com>
Subject Re: OutOfMemoryError due to TopicSubscription
Date Mon, 25 Feb 2013 21:15:54 GMT
bridge per destination is unnecessary. especially if you're using the
default mem options which are much to low. also, why are you altering the
prefetch settings on the bridge and setting to 1? looks like someone wasn't
very sure about the config options that were chosen... you're using default
memory configs, unnecessarily limiting the bridge prefetch, producer flow
control is false, etc, etc, etc. this config is ripe for OOM.

It would be very worthwhile to understand all of the config settings from
the following wiki docs and make very calculated decisions about which ones
to change:

http://activemq.apache.org/message-cursors.html
http://activemq.apache.org/javalangoutofmemory.html
http://activemq.apache.org/producer-flow-control.html
http://activemq.apache.org/networks-of-brokers.html

hope that helps..


On Mon, Feb 25, 2013 at 1:34 PM, Ishitori <Ishitori@bk.ru> wrote:

> I am not sure why it uses a bridge to destination feature. Is there another
> way to configure it? (sysadmin did it that way, not me)
>
> But I wonder is 6 bridges is really a high number? How many resources does
> it take to support a separate advisory topic subs? Here is the full config:
>
> <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">
>
>     <bean
>
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>         <property name="locations">
>             <value>credentials_path</value>
>         </property>
>     </bean>
>
>     <broker xmlns=&quot;http://activemq.apache.org/schema/core&quot;
> brokerName=&quot;AMQ_Broker_1&quot; useJmx=&quot;true&quot;
> persistent=&quot;true&quot; dataDirectory=&quot;&lt;path>"
> useShutdownHook="true" schedulerSupport="true"
> schedulerDirectory="<scheduler_path>" >
>
>         <destinationPolicy>
>             <policyMap>
>               <policyEntries>
>                 <policyEntry topic=">" producerFlowControl="false"
> memoryLimit="1mb">
>                   <pendingSubscriberPolicy>
>                     <vmCursor />
>                   </pendingSubscriberPolicy>
>                 </policyEntry>
>                 <policyEntry queue=">" producerFlowControl="false"
> memoryLimit="10mb" enableAudit="false">
>                   <networkBridgeFilterFactory>
>                     <conditionalNetworkBridgeFilterFactory
> replayWhenNoConsumers="true" />
>                   </networkBridgeFilterFactory>
>                   <deadLetterStrategy>
>                     <individualDeadLetterStrategy queuePrefix="DLQ."
> processExpired="false"/>
>                   </deadLetterStrategy>
>                   <pendingQueuePolicy>
>                     <fileQueueCursor/>
>                   </pendingQueuePolicy>
>                 </policyEntry>
>               </policyEntries>
>             </policyMap>
>         </destinationPolicy>
>
>         <managementContext>
>             <managementContext createConnector="true" connectorHost="host"
> connectorPort="port" rmiServerPort="rmiPort"/>
>         </managementContext>
>
>         <networkConnectors>
>             <networkConnector
>                name="TopicsOnly-duplex"
>                uri="static:(nio://ip)"
>                networkTTL="2"
>                prefetchSize="1"
>                duplex="true">
>                <dynamicallyIncludedDestinations>
>                    <topic physicalName=">"/>
>                </dynamicallyIncludedDestinations>
>             </networkConnector>
>
>             <networkConnector
>                name="queue1-duplex"
>                uri="static:(nio://ip)"
>                networkTTL="2"
>                prefetchSize="1"
>                duplex="true"
>                decreaseNetworkConsumerPriority = "true"
>                suppressDuplicateQueueSubscriptions = "true"
>                conduitSubscriptions="false">
>                <dynamicallyIncludedDestinations>
>                    <queue physicalName="queue1"/>
>                </dynamicallyIncludedDestinations>
>             </networkConnector>
>
>             <networkConnector
>                name="queue2-duplex"
>                uri="static:(nio://ip)"
>                networkTTL="2"
>                prefetchSize="1"
>                duplex="true"
>                decreaseNetworkConsumerPriority = "true"
>                suppressDuplicateQueueSubscriptions = "true"
>                conduitSubscriptions="false">
>                <dynamicallyIncludedDestinations>
>                    <queue physicalName="queue2"/>
>                </dynamicallyIncludedDestinations>
>             </networkConnector>
>
>             <networkConnector
>                name="queue3-duplex"
>                uri="static:(nio://ip)"
>                networkTTL="2"
>                prefetchSize="1"
>                duplex="true"
>                decreaseNetworkConsumerPriority = "true"
>                suppressDuplicateQueueSubscriptions = "true"
>                conduitSubscriptions="false">
>                <dynamicallyIncludedDestinations>
>                    <queue physicalName="queue3"/>
>                </dynamicallyIncludedDestinations>
>             </networkConnector>
>
>             <networkConnector
>                name="queue4-duplex"
>                uri="static:(nio://ip)"
>                networkTTL="2"
>                prefetchSize="1"
>                duplex="true"
>                decreaseNetworkConsumerPriority = "true"
>                suppressDuplicateQueueSubscriptions = "true"
>                conduitSubscriptions="false">
>                <dynamicallyIncludedDestinations>
>                    <queue physicalName="queue4"/>
>                </dynamicallyIncludedDestinations>
>             </networkConnector>
>
>             <networkConnector
>                name="queue5-duplex"
>                uri="static:(nio://ip)"
>                networkTTL="2"
>                prefetchSize="1"
>                duplex="true"
>                decreaseNetworkConsumerPriority = "true"
>                suppressDuplicateQueueSubscriptions = "true"
>                conduitSubscriptions="false">
>                <dynamicallyIncludedDestinations>
>                    <queue physicalName="queue5"/>
>                </dynamicallyIncludedDestinations>
>             </networkConnector>
>         </networkConnectors>
>
>         <persistenceAdapter>
>             <kahaDB directory="path"/>
>         </persistenceAdapter>
>
>         <systemUsage>
>             <systemUsage>
>                 <memoryUsage>
>                     <memoryUsage limit="64 mb"/>
>                 </memoryUsage>
>                 <storeUsage>
>                     <storeUsage limit="45 gb"/>
>                 </storeUsage>
>                 <tempUsage>
>                     <tempUsage limit="2 gb"/>
>                 </tempUsage>
>             </systemUsage>
>         </systemUsage>
>
>         <transportConnectors>
>             <transportConnector name="nio" uri="nio://ip"
> auditNetworkProducers="true"/>
>         </transportConnectors>
>
>     </broker>
>     <import resource="jetty.xml"/>
>
> </beans>
>
>
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/OutOfMemoryError-due-to-TopicSubscription-tp4664025p4664054.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>



-- 
*Christian Posta*
http://www.christianposta.com/blog
twitter: @christianposta

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message