You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Maarten Manders <ma...@tilllate.com> on 2008/03/06 10:28:44 UTC

Persistence From Redo Log Only?

Hi everybody

I managed to make my ActiveMQ broker persistent - however I'm not quite sure
if it's running the way it should. Every time i start up the broker, it
writes the following to the log:

INFO  KahaStore                      - Kaha Store using data directory
/usr/local/activemq/activemq-data/kr-store/state
INFO  AMQPersistenceAdapter          - Active data files: []
WARN  AMQPersistenceAdapter          - The ReferenceStore is not valid -
recovering ...
INFO  KahaStore                      - Kaha Store successfully deleted data
directory /usr/local/activemq/activemq-data/kr-store/data
INFO  AMQPersistenceAdapter          - Journal Recovery Started from:
DataManager:(data-)
INFO  KahaStore                      - Kaha Store using data directory
/usr/local/activemq/activemq-data/kr-store/data
INFO  AMQPersistenceAdapter          - Recovered 310047 operations from redo
log in 212.301 seconds.
INFO  AMQPersistenceAdapter          - Finished recovering the
ReferenceStore

Obviously, recovering from the journal (= redo log, correct?) is quite slow.
Shouldn't ActiveMQ recover from the Kaha Reference Store instead?
Unfortunately, I'm getting a "The ReferenceStore is not valid" all the time.

Here's my config:

  <broker xmlns="http://activemq.org/config/1.0" brokerName="localhost"
persistent="true" useShutdownHook="false"
dataDirectory="${activemq.base}/data">

    <!-- The transport connectors ActiveMQ will listen to -->
    <transportConnectors>
       <transportConnector name="stomp" uri="stomp://localhost:61613"/>
    </transportConnectors>

    <!-- Use the following if you wish to configure the journal with JDBC
-->
    <persistenceAdapter>
      <amqPersistenceAdapter directory="${activemq.base}/activemq-data"
maxFileLength="32mb"/>
    </persistenceAdapter>

  </broker>


Aside from that, I have some other questions:

1. Persistent messages that are recovered on startup don't appear in the
admin console. However, I'm able to subscribe and receive them, which
confuses the console even more and makes it show a negative number in
"Number Of Pending Messages". Is this normal or is it related to the fact,
that my messages are not properly persisting?

2. ActiveMQ chokes (it sometimes takes seconds until the messages start
arriving), when trying to receive recovered messages after startup (at least
for > 100k messages). I guess, that's normal, since it's a lot of
messages... is that correct?

3. What's the useShutdownHook="false" for, which I see in all ActiveMQ conf
examples?

Thanks in advance! & Cheers!
Maarten
-- 
View this message in context: http://www.nabble.com/Persistence-From-Redo-Log-Only--tp15869535s2354p15869535.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Persistence From Redo Log Only?

Posted by deen0 <di...@innotech.no>.
I also have the same problem. I am running the latest 5.1-snapshot on Redhat
Enterprise Linux.

After restarting broker, a large number of messages is replayed from the
redo-log. I am using transacted producers/consumers, and there are no
pending messages before the borker restarts.

Now, where are those messages coming from!? Someone please help...



dfrodrig wrote:
> 
> Hello, I have the exact same questions, could someone reply?
> 
> I would like to add the following: I am trying to use a Master Slave
> configuration sitting on top of a SAN in order to provide high
> availability, but the fact is that everytime I stop the master and the
> slave takes over, the entire system is hanging for the time of recovery
> (exactly like described by Marteen). JDBC is way too slow for having
> persistence + high availability, so how could this problem be tackled?  
> 
> Does it mean we cannot rely on Activemq for providing high availability,
> or is it some broker configuration that needs to be addressed? 
> 
> anyone could answer this post? Thanks!
> 
> 
> 
> Maarten Manders wrote:
>> 
>> Hi everybody
>> 
>> I managed to make my ActiveMQ broker persistent - however I'm not quite
>> sure if it's running the way it should. Every time i start up the broker,
>> it writes the following to the log:
>> 
>> INFO  KahaStore                      - Kaha Store using data directory
>> /usr/local/activemq/activemq-data/kr-store/state
>> INFO  AMQPersistenceAdapter          - Active data files: []
>> WARN  AMQPersistenceAdapter          - The ReferenceStore is not valid -
>> recovering ...
>> INFO  KahaStore                      - Kaha Store successfully deleted
>> data directory /usr/local/activemq/activemq-data/kr-store/data
>> INFO  AMQPersistenceAdapter          - Journal Recovery Started from:
>> DataManager:(data-)
>> INFO  KahaStore                      - Kaha Store using data directory
>> /usr/local/activemq/activemq-data/kr-store/data
>> INFO  AMQPersistenceAdapter          - Recovered 310047 operations from
>> redo log in 212.301 seconds.
>> INFO  AMQPersistenceAdapter          - Finished recovering the
>> ReferenceStore
>> 
>> Obviously, recovering from the journal (= redo log, correct?) is quite
>> slow. Shouldn't ActiveMQ recover from the Kaha Reference Store instead?
>> Unfortunately, I'm getting a "The ReferenceStore is not valid" all the
>> time.
>> 
>> Here's my config:
>> 
>>   <broker xmlns="http://activemq.org/config/1.0" brokerName="localhost"
>> persistent="true" useShutdownHook="false"
>> dataDirectory="${activemq.base}/data">
>> 
>>     <!-- The transport connectors ActiveMQ will listen to -->
>>     <transportConnectors>
>>        <transportConnector name="stomp" uri="stomp://localhost:61613"/>
>>     </transportConnectors>
>> 
>>     <!-- Use the following if you wish to configure the journal with JDBC
>> -->
>>     <persistenceAdapter>
>>       <amqPersistenceAdapter directory="${activemq.base}/activemq-data"
>> maxFileLength="32mb"/>
>>     </persistenceAdapter>
>> 
>>   </broker>
>> 
>> 
>> Aside from that, I have some other questions:
>> 
>> 1. Persistent messages that are recovered on startup don't appear in the
>> admin console. However, I'm able to subscribe and receive them, which
>> confuses the console even more and makes it show a negative number in
>> "Number Of Pending Messages". Is this normal or is it related to the
>> fact, that my messages are not properly persisting?
>> 
>> 2. ActiveMQ chokes (it sometimes takes seconds until the messages start
>> arriving), when trying to receive recovered messages after startup (at
>> least for > 100k messages). I guess, that's normal, since it's a lot of
>> messages... is that correct?
>> 
>> 3. What's the useShutdownHook="false" for, which I see in all ActiveMQ
>> conf examples?
>> 
>> Thanks in advance! & Cheers!
>> Maarten
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Persistence-From-Redo-Log-Only--tp15869535s2354p16299974.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Persistence From Redo Log Only?

Posted by dfrodrig <da...@cern.ch>.
Hello, I have the exact same questions, could someone reply?

I would like to add the following: I am trying to use a Master Slave
configuration sitting on top of a SAN in order to provide high availability,
but the fact is that everytime I stop the master and the slave takes over,
the entire system is hanging for the time of recovery (exactly like
described by Marteen). JDBC is way too slow for having persistence + high
availability, so how could this problem be tackled?  

Does it mean we cannot rely on Activemq for providing high availability, or
is it some broker configuration that needs to be addressed? 

anyone could answer this post? Thanks!



Maarten Manders wrote:
> 
> Hi everybody
> 
> I managed to make my ActiveMQ broker persistent - however I'm not quite
> sure if it's running the way it should. Every time i start up the broker,
> it writes the following to the log:
> 
> INFO  KahaStore                      - Kaha Store using data directory
> /usr/local/activemq/activemq-data/kr-store/state
> INFO  AMQPersistenceAdapter          - Active data files: []
> WARN  AMQPersistenceAdapter          - The ReferenceStore is not valid -
> recovering ...
> INFO  KahaStore                      - Kaha Store successfully deleted
> data directory /usr/local/activemq/activemq-data/kr-store/data
> INFO  AMQPersistenceAdapter          - Journal Recovery Started from:
> DataManager:(data-)
> INFO  KahaStore                      - Kaha Store using data directory
> /usr/local/activemq/activemq-data/kr-store/data
> INFO  AMQPersistenceAdapter          - Recovered 310047 operations from
> redo log in 212.301 seconds.
> INFO  AMQPersistenceAdapter          - Finished recovering the
> ReferenceStore
> 
> Obviously, recovering from the journal (= redo log, correct?) is quite
> slow. Shouldn't ActiveMQ recover from the Kaha Reference Store instead?
> Unfortunately, I'm getting a "The ReferenceStore is not valid" all the
> time.
> 
> Here's my config:
> 
>   <broker xmlns="http://activemq.org/config/1.0" brokerName="localhost"
> persistent="true" useShutdownHook="false"
> dataDirectory="${activemq.base}/data">
> 
>     <!-- The transport connectors ActiveMQ will listen to -->
>     <transportConnectors>
>        <transportConnector name="stomp" uri="stomp://localhost:61613"/>
>     </transportConnectors>
> 
>     <!-- Use the following if you wish to configure the journal with JDBC
> -->
>     <persistenceAdapter>
>       <amqPersistenceAdapter directory="${activemq.base}/activemq-data"
> maxFileLength="32mb"/>
>     </persistenceAdapter>
> 
>   </broker>
> 
> 
> Aside from that, I have some other questions:
> 
> 1. Persistent messages that are recovered on startup don't appear in the
> admin console. However, I'm able to subscribe and receive them, which
> confuses the console even more and makes it show a negative number in
> "Number Of Pending Messages". Is this normal or is it related to the fact,
> that my messages are not properly persisting?
> 
> 2. ActiveMQ chokes (it sometimes takes seconds until the messages start
> arriving), when trying to receive recovered messages after startup (at
> least for > 100k messages). I guess, that's normal, since it's a lot of
> messages... is that correct?
> 
> 3. What's the useShutdownHook="false" for, which I see in all ActiveMQ
> conf examples?
> 
> Thanks in advance! & Cheers!
> Maarten
> 

-- 
View this message in context: http://www.nabble.com/Persistence-From-Redo-Log-Only--tp15869535s2354p16184998.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Persistence From Redo Log Only?

Posted by deen0 <di...@innotech.no>.
Hi dfrodrig,

Sorry, but i can't help you.

I hope someone from ActiveMQ team can answer...



dfrodrig wrote:
> 
> Hi Deen,
> 
> I am not using Jms transactions in most of the messages sent, and still
> the failover takes a huge amount of time.
> 
> The problem is still around, any ideas to solve it? Should I raise a bug,
> or is this an ActiveMQ feature? :-))
> 
> 
> 


-- 
View this message in context: http://www.nabble.com/Persistence-From-Redo-Log-Only--tp15869535s2354p16936422.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Persistence From Redo Log Only?

Posted by dfrodrig <da...@cern.ch>.
Hi Deen,

I am not using Jms transactions in most of the messages sent, and still the
failover takes a huge amount of time.

The problem is still around, any ideas to solve it? Should I raise a bug, or
is this an ActiveMQ feature? :-))






deen0 wrote:
> 
> When i stopped using jms transactions, and started using client
> acknowledgements, all these problems went away, and AMQ 5.1-snapshot is
> now very stable and working just as expected.
> 
> So my personal recommendation - do not use transactions. Use client
> acknoledgements instead (acknowledge instead of commit, revert instead of
> rollback).
> 
> Best regards.
> 
:-)
-- 
View this message in context: http://www.nabble.com/Persistence-From-Redo-Log-Only--tp15869535s2354p16931584.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Persistence From Redo Log Only?

Posted by deen0 <di...@innotech.no>.
When i stopped using jms transactions, and started using client
acknowledgements, all these problems went away, and AMQ 5.1-snapshot is now
very stable and working just as expected.

So my personal recommendation - do not use transactions. Use client
acknoledgements instead (acknowledge instead of commit, revert instead of
rollback).

Best regards.
-- 
View this message in context: http://www.nabble.com/Persistence-From-Redo-Log-Only--tp15869535s2354p16596885.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Persistence From Redo Log Only?

Posted by unknown12 <di...@momentschutz.de>.
Same here!

Each time i restart (shutdown/start) AMQ5|5.1 the KAHA store is recovered
and any message will be redelivered...Additionally the output of the admin
web console looks strange and is quite unusable (negative number of messages
pending or an empty message list is being displayed when clicking on the
queue but a some messages are displayed as pending...)

It's a bit weird... Is this a version issue? Has someone experienced this
with AMQ < 5?
-- 
View this message in context: http://www.nabble.com/Persistence-From-Redo-Log-Only--tp15869535s2354p16559430.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.