SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Help! Replication high latency problem


Help! Replication high latency problem

Author
Message
alanlee
alanlee
SSC-Enthusiastic
SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)

Group: General Forum Members
Points: 114 Visits: 171
In live environment, I have published 5 databases from MAIN-DB to REP-DB using PULL transactional replication.
When I open replication monitor in MAIN-DB, I see that 4 subscriptions have latency of a few seconds.
But one subscription has very high latency (14:10:34), and the status is "Performance critical".
I see that from replication monitor:
1) "Publisher To Distributor History" is running and last action message is "Delivering replicated transactions, xact count: 341, command count: 401".
2) "Distributor To Subscriber History" is running and last action message is "No replicated transactions are available."
3) "Undistributed Commands" shows number of commands waiting to be applied to subscriber = 0

I tried to use post tracer token to check the latency, but the result from sp_helptracertokenhistory shows NULL in both distributor_latency and subscriber_latency.
What should I do? Should I restart some of the agents? If so, which agent should I restart?
alanlee
alanlee
SSC-Enthusiastic
SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)

Group: General Forum Members
Points: 114 Visits: 171
I checked at the subscriber (REP-DB). When I click "View synchronization status" at the subscription, it shows "Synchronization in progress".

I also checked one table where the data is continuously growing.
At publisher (MAIN-DB), the table has 23082538 rows. The count increases by about 20-30 every minute.
At subscriber (REP-DB), the table has 23007930 rows. The count stays unchanged for several minutes, then suddenly increased to 23008130.
alanlee
alanlee
SSC-Enthusiastic
SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)

Group: General Forum Members
Points: 114 Visits: 171
Both MAIN-DB and REP-DB are in the same LAN. Network latency should not be the problem.
I have set the subscriber synchronization schedule to be "run continuously".
alanlee
alanlee
SSC-Enthusiastic
SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)

Group: General Forum Members
Points: 114 Visits: 171
Distribution is running at same server as Publisher.

The result of EXEC sp_MSenum_logreader @name = '%',@show_distdb =0 shows
comments: 500 transaction(s) with 599 command(s) were delivered.
delivery time: 82228516
delivered transactions: 116917
delivered commands: 132850
average_commands: 1
delivery_rate: 1
delivery_latency: 53536866

The result of EXEC sp_MSenum_distribution @name = '%',@show_distdb =0 shows
comments: 99 transaction(s) with 117 command(s) were delivered.
delivery time: 0
delivered transactions: 116918
delivered commands: 132851
average_commands: 1
delivery_rate: 1468
delivery_latency: 25153
alanlee
alanlee
SSC-Enthusiastic
SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)SSC-Enthusiastic (114 reputation)

Group: General Forum Members
Points: 114 Visits: 171
Changed the log reader agent profile to PollingInterval = 1 and ReadBatchSize = 5000.
Restarted log reader agent.
But seems that does not help.
Delivery rate is still always 1.
From replication monitor, the "Last action" of log reader agent shows something like "Delivering replicated transactions, xact count: 3888, command count: 4401".
The message remains there for about half minute, then the numbers (xact count, command count) changed a bit. This behavior continues.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search