Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Help! Replication high latency problem Expand / Collapse
Author
Message
Posted Tuesday, November 20, 2012 9:18 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, March 13, 2013 9:40 PM
Points: 12, 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?
Post #1387220
Posted Tuesday, November 20, 2012 9:28 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, March 13, 2013 9:40 PM
Points: 12, 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.
Post #1387222
Posted Tuesday, November 20, 2012 9:34 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, March 13, 2013 9:40 PM
Points: 12, 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".
Post #1387224
Posted Tuesday, November 20, 2012 10:16 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, March 13, 2013 9:40 PM
Points: 12, 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
Post #1387229
Posted Wednesday, November 21, 2012 2:43 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Wednesday, March 13, 2013 9:40 PM
Points: 12, 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.

Post #1387307
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse