Wednesday, January 5, 2011

MSSQL Replication Error: "The process could not connect to Subscriber"



Error Message: "The process could not connect to Subscriber"

MSSQL Error: 45000 Severity: 16 State: 1 ALERT: REPLICATION LATENCY BETWEEN PUBLISHER AND DISTRIBUTOR IS MORE THAN THE THRESHOLD VALUE OF 3000 SECONDS FOR THE PUBLICATION:TuitionaffordablePublication SUBSCRIBER:Tuitionaffordable || SUBSCRIBER DB:TestDB

I connect to the replication agent and found that the distributor was struggling with following error:

Message
The replication agent encountered an error and is set to restart within the job step retry interval. See the previous job step history message or Replication Monitor for more information. The Agent 'Tuitionaffordable-Test_0_Rpt1-Tuitionaffordable1-33' is retrying after an error. 5 retries attempted. See agent job history in the Jobs folder for more details.

Let's Understand: The process could not connect to Subscriber 'TuitionaffordableREP1' indicates that there is some connection problem between the subscriber and the publisher.

Let's go to the job and find out what went wrong:

The job history looks like as follows:

Date                      1/5/2011 10:50:00 AM
Log                         Job History (Tuitionaffordable-Test_0_Rpt1-Tuitionaffordable1-33)

Step ID                 2
Server                   Tuitionaffordable
Job Name            Tuitionaffordable-Test_0_Rpt1-Tuitionaffordable1-33
Step Name         Run agent.
Duration              00:06:56
Sql Severity                        0
Sql Message ID                 0
Operator Emailed                           
Operator Net sent                          
Operator Paged                               
Retries Attempted                          0

Message
2011-01-05 10:50:00:112 User-specified agent parameter values:
                                                -Subscriber Tuitionaffordable1
                                                -SubscriberDB Test
                                                -Publisher Tuitionaffordable
                                                -Distributor TuitionaffordableDist
                                                -DistributorSecurityMode 1
                                                -PublisherDB Test
                                                -OutputVerboseLevel 0
                                                -Continuous
                                                -XJOBID 0x64BAEC84ECCFB2423D323296D689F
                                                -XJOBNAME Tuitionaffordable-Test_0_Rpt1-Tuitionaffordable1-33
                                                -XSTEPID 2
                                                -XSUBSYSTEM Distribution
                                                -XSERVER Tuitionaffordable
                                                -XCMDLINE 0
                                                -XCancelEventHandle 0000000222000991

Custom Search
                                                -XParentProcessHandle 0000003330013DC
2011-01-05 10:50:00:112 Startup Delay: 4935 (msecs)Parameter values obtained from agent profile:
                                                -bcpbatchsize 213232247
                                                -commitbatchsize 100
                                                -commitbatchthreshold 1000
                                                -historyverboselevel 1
                                                -keepalivemessageinterval 300
                                                -logintimeout 15
                                                -maxbcpthreads 1
                                                -maxdeliveredtransactions 0
                                                -pollinginterval 5000
                                                -querytimeout 1800
                                                -skiperrors
                                                -transactionsperhistory 100
2011-01-05 10:50:00:112 The process could not connect to Subscriber 'TuitionaffordableREP1'.
2011-01-05 10:50:00:112 The agent failed with a 'Retry' status. Try to run the agent at a later time.

Action: The next step is to go to the subscriber and look whether there is any connection from host 'Publisher'.

SELECT *
FROM   sys.sysprocesses
where   hostname = 'Tuitionaffordable'

Let's Understad: I can see the connection from publisher but the job and replication agent throw following error continuously: "The process could not connect to Subscriber".

Problem Found: The exact problem is that there is a lot of blocking because of which the resources are not allocated to the publisher connection and this throws a false error. I killed some resource intensive jobs and replication started working properly.



No comments:

Post a Comment