You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Sandeep Chayapathi <sa...@wssource.com> on 2007/01/17 18:21:14 UTC

stopping master bridge, negociation timeout & out of memory exceptions

Hi all,

 We have 2 amq servers, in a master-slave setup. Recently, I observed
this in the master's log file (see attached). Basically, there were
quite a few debug messages about stopping master bridge and "negociation
timeout". Later, followed by a out of memory exception. 

 The master server continued to run, even after the memory exception,
but reading messages from a specific topic, froze the consumer.

 I had a durable subscription to a topic, but the subscriber had
disconnected for a while and the subscription had collected around
40,000 messages (at a guess). Here is my activemq.xml

--------

    <memoryManager>
        <usageManager id="memory-manager" limit="2048 MB"/>
    </memoryManager>

    <destinationPolicy>
      <policyMap><policyEntries>

          <policyEntry topic="wss.>">
            <dispatchPolicy>
              <strictOrderDispatchPolicy />
            </dispatchPolicy>
            <subscriptionRecoveryPolicy>
              <lastImageSubscriptionRecoveryPolicy />
            </subscriptionRecoveryPolicy>
            <pendingMessageLimitStrategy>
              <constantPendingMessageLimitStrategy limit="50000"/>
            </pendingMessageLimitStrategy>
          </policyEntry>

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

with both "usageManager" and the "message limit strategy", I expected
activemq to drop old messages on a durable subscription, once the limit
was hit. In a separate test on one of the dev servers, I observed , via
the jmx console, on a durable subscription the messages were never
dropped, even after crossing the limit.

 we are running ActiveMQ 4.1 (stable), with 64bit Java v1.5.0. Any help
is appreciated. Thanks.

- Sandeep

Re: stopping master bridge, negociation timeout & out of memory exceptions

Posted by David Borja <ad...@gmail.com>.
Hi activemq devs!!

I'm having a problem with activemq and log4j ...

this is my log4j.properties :

log4j.appender.A1=org.apache.log4j.net.JMSAppender
log4j.appender.A1.InitialContextFactoryName=org.apache.activemq.jndi.ActiveMQInitialContextFactory
log4j.appender.A1.ProviderURL=tcp://dllo-aborja:61616
log4j.appender.A1.TopicBindingName=jms/log.queue
log4j.appender.A1.TopicConnectionFactoryBindingName=ConnectionFactory

log4j.appender.A1.layout=lineai.base.jms.util.log4j.XMLLayout

When i try to send log message, the following exception is thrown:

log4j:ERROR Error while activating options for appender named [A1].
javax.jms.JMSException: Wire format negociation timeout: peer did not send
his wire format.
    at org.apache.activemq.util.JMSExceptionSupport.create(
JMSExceptionSupport.java:58)
    at org.apache.activemq.ActiveMQConnection.syncSendPacket(
ActiveMQConnection.java:1181)
    at org.apache.activemq.ActiveMQConnection.ensureConnectionInfoSent(
ActiveMQConnection.java:1259)
    at org.apache.activemq.ActiveMQConnection.createSession(
ActiveMQConnection.java:274)
    at org.apache.activemq.ActiveMQConnection.createTopicSession(
ActiveMQConnection.java:960)
    at org.apache.log4j.net.JMSAppender.activateOptions(Unknown Source)
    at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java
:256)
    at org.apache.log4j.config.PropertySetter.setProperties(
PropertySetter.java:132)
    at org.apache.log4j.config.PropertySetter.setProperties(
PropertySetter.java:96)
    at org.apache.log4j.PropertyConfigurator.parseAppender(
PropertyConfigurator.java:654)
    at org.apache.log4j.PropertyConfigurator.parseCategory(
PropertyConfigurator.java:612)
    at org.apache.log4j.PropertyConfigurator.configureRootCategory(
PropertyConfigurator.java:509)
    at org.apache.log4j.PropertyConfigurator.doConfigure(
PropertyConfigurator.java:415)
    at org.apache.log4j.PropertyConfigurator.doConfigure(
PropertyConfigurator.java:441)
    at org.apache.log4j.PropertyConfigurator.configure(
PropertyConfigurator.java:336)
    at lineai.base.jms.util.log4j.LogTest.test(LogTest.java:12)
    at lineai.base.jms.util.log4j.LogTest.main(LogTest.java:24)
Caused by: java.io.IOException: Wire format negociation timeout: peer did
not send his wire format.
    at org.apache.activemq.transport.WireFormatNegotiator.oneway(
WireFormatNegotiator.java:88)
    at org.apache.activemq.transport.MutexTransport.oneway(
MutexTransport.java:43)
    at org.apache.activemq.transport.ResponseCorrelator.asyncRequest(
ResponseCorrelator.java:69)
    at org.apache.activemq.transport.ResponseCorrelator.request(
ResponseCorrelator.java:74)
    at org.apache.activemq.ActiveMQConnection.syncSendPacket(
ActiveMQConnection.java:1171)
    ... 15 more

Any ideas??

Thnx ...

David

Re: stopping master bridge, negociation timeout & out of memory exceptions

Posted by Sandeep Chayapathi <sa...@wssource.com>.

Sandeep Chayapathi wrote:
> 
> 1. usage manager reference
> (http://activemq.org/site/xbean-xml-reference-41.html#XBeanXMLReference4.1-usageManagerelement)
> says, "limit" property sets memory limit in bytes. I have switched to
> using "limitMb" property instead
> 

Activemq 4.1 doesn't recognize "limitMb" as a usageManager's property.
Throws as "
Bean property 'limitMb' is not writable or has an invalid setter method"
error.

And Im not sure if "limit" takes values in MB either, so I have moved back
to setting values in bytes.



Sandeep Chayapathi wrote:
> 
> 2. In case "limit" of "2048 MB" was correct, the ACTIVEMQ_OPTS had max
> memory pool (-Xmx) as 512. I have switched to 4096MB (big iron server
> yay!)
> 

This definitely seems to help


Sandeep Chayapathi wrote:
> 
> 3. few threads indicated multicast transport could be the culprit, I
> have removed the auto discover mode (multicast discovery) for now.
> 

Not sure if "multicast discovery" is root cause of the problem I faced.

- Sandeep
-- 
View this message in context: http://www.nabble.com/stopping-master-bridge%2C-negociation-timeout---out-of-memory--exceptions-tf3028623.html#a8435224
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: stopping master bridge, negociation timeout & out of memory exceptions

Posted by Sandeep Chayapathi <sa...@wssource.com>.
replying to self: maybe few reason for the "out of memory" exception
are:

1. usage manager reference
(http://activemq.org/site/xbean-xml-reference-41.html#XBeanXMLReference4.1-usageManagerelement) says, "limit" property sets memory limit in bytes. I have switched to using "limitMb" property instead

2. In case "limit" of "2048 MB" was correct, the ACTIVEMQ_OPTS had max
memory pool (-Xmx) as 512. I have switched to 4096MB (big iron server
yay!)

3. few threads indicated multicast transport could be the culprit, I
have removed the auto discover mode (multicast discovery) for now.

I hope these steps would solve the issue. If anyone is following this,
pls post your comments. I'll update with whether this worked or not.

- Sandeep


Re: stopping master bridge, negociation timeout & out of memory exceptions

Posted by Sandeep Chayapathi <sa...@wssource.com>.
Followup, additionally, the transportConnectors on the master server

    <transportConnectors>
       <transportConnector name="openwire" uri="tcp://master:61616"
discoveryUri="multicast://default"/>
       <transportConnector name="ssl"     uri="ssl://master:61617"/>
       <transportConnector name="stomp"   uri="stomp://master:61613"/>
    </transportConnectors>

and on the slave:

    <transportConnectors>
       <transportConnector name="openwire" uri="tcp://slave:61616"
discoveryUri="multicast://default"/>
       <transportConnector name="ssl"     uri="ssl://slave:61617"/>
       <transportConnector name="stomp"   uri="stomp://slave:61613"/>
    </transportConnectors>


- Sandeep