Increase SQL Replication Frequency?

52 views
Skip to first unread message

Philip Bjorge

unread,
Mar 10, 2017, 2:51:15 PM3/10/17
to RavenDB - 2nd generation document database
Hi,
We're running the latest Raven 3.0 database and are interested in knowing how we can increase the frequency that documents are replicated via SQL replication?
On occasion, we're seeing delays of 3-10 minutes and it would be nice if we could have things consistently replicating every minute or so.

Are there any configuration settings we can tweak here?

Thanks

Oren Eini (Ayende Rahien)

unread,
Mar 10, 2017, 2:57:03 PM3/10/17
to ravendb
This should be running constantly. There isn't any delay going on. 
It is possible that it is taking a long time because you are missing indexes?

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Philip Bjorge

unread,
Mar 10, 2017, 5:53:36 PM3/10/17
to RavenDB - 2nd generation document database
We have indexes on the SQL table that is being replicated to and performance on that table isn't an issue.
Turning on debug logging shows that when replication is taking place, it happens very quickly.

I am seeing instant replication in our integration environment which has effectively no load.

Where SQL replication sometimes has 3-15 minute delays is in our production environment.
This environment has tens of millions of documents if that makes a difference.
It is a dedicated replication box and is not serving any reads or writes (other than through replication).
Looking at our monitoring, CPU load and memory consumption is low on the instance -- ~15% CPU consumption and ~50% memory consumption.
There are no replication failures.

Right now for example, the Raven/SqlReplication/Status document hasn't been touched in 10 minutes even though we've had hundreds of documents touched since then.

How would you recommend debugging this issue because I agree with you that looking at the bundle's code, this shouldn't be happening... but it is and isn't meeting our expectations of this feature.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.

Philip Bjorge

unread,
Mar 10, 2017, 5:58:53 PM3/10/17
to RavenDB - 2nd generation document database
So our latest batch just went through and it replicated 10,000 items.
Below is a screenshot of the sql replication dashboard which shows a 10 minute gap between replication.

Philip Bjorge

unread,
Mar 10, 2017, 6:21:46 PM3/10/17
to RavenDB - 2nd generation document database
So looking at the debug logs, there's just a legitimate 10 minute gap. I've "anonymized" the logs below.

2017-03-10 22:43:20.4442,Raven.Database.Bundles.SqlReplication.SqlReplicationTask,Debug,,78,"Replicated changes of ... for replication ...",
           # We have about 10 other things being replicated here 
2017-03-10 22:44:07.2555,Raven.Database.Bundles.SqlReplication.SqlReplicationTask,Debug,,119,recorded a deleted document ...
# Lots of deletes recorded here
2017-03-10 22:53:29.4755,Raven.Database.Bundles.SqlReplication.SqlReplicationTask,Debug,,240,"Replicated changes of ... for replication ..."
           # We have about 10 other things being replicated here 
 
Thanks for looking
We are running build #30171

Oren Eini (Ayende Rahien)

unread,
Mar 12, 2017, 8:38:39 AM3/12/17
to ravendb
Can you send us the full log file (please include the customer details as well in the email to sup...@ravendb.net).
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Philip Bjorge

unread,
Mar 13, 2017, 6:59:59 PM3/13/17
to RavenDB - 2nd generation document database
While gathering our logs, we determined the issue.
For one of our collections, a document change could trigger 10s of thousands of inserts... Since these aren't happening as bulk inserts, even though they each took only 1ms, they seem to stop up replication.

We've resolved by disabling this replication collection for now, with a more permanent fix being to split up into two sql replication instances.
Has the behavior in 3.5 changed at all such that this might not be an issue?

Thanks

Oren Eini (Ayende Rahien)

unread,
Mar 14, 2017, 2:46:32 AM3/14/17
to ravendb
No, this didn't change in 3.5
What scenario do you have that a single document will have so many inserts?
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Philip Bjorge

unread,
Mar 20, 2017, 4:59:16 PM3/20/17
to RavenDB - 2nd generation document database
A pretty degenerate scenario to be fair.
Large documents (1+ MB) that had large arrays of child objects in them. These child objects were being replicated to their own table.
Reply all
Reply to author
Forward
0 new messages