0

I am trying to initialize a merge subscription but it fails and gives error that Query timeout expired.

The merge process failed to execute a query because the query timed out. If this failure continues, increase the query timeout for the process. When troubleshooting, restart the synchronization with verbose history logging and specify an output file to which to write.

When i check the SQL activity monitor, it shows that sys.sp_MSCleanupForPullReinit command is in SUSPENDED mode and has wait type SLEEP_BPOOL_FLUSH

I tried to stop and start replication agent but still getting same issue.

How can this be fixed?

Thakur
  • 1,890
  • 5
  • 23
  • 33

1 Answers1

1

This can be normal behavior when applying a snapshot and is generally encountered during the index creation phase of the snapshot application process. Index creation statements can be time consuming and cause the agent to time out. Try bumping the Merge Agent -QueryTimeout value to 900 seconds and see if that helps.

Brandon Williams
  • 3,695
  • 16
  • 19
  • setting -QueryTimeout to 900 didnt work, it just keeps on waiting :( – Thakur Apr 23 '12 at 05:44
  • Enable verbose agent logging to see where it is failing. Add the parameters -OutputVerboseLevel 4 -Output C:\TEMP\mergeagent.log to the Merge Agent job step. Re-run the Merge Agent and collect the log. This will give more detail on what the agent is working on when it times out. – Brandon Williams Apr 23 '12 at 06:19