Microsoft KB Archive/936891

From BetaArchive Wiki
Knowledge Base


A memory leak may occur when the Merge Replication Agent retries a connection in SQL Server 2005

Article ID: 936891

Article Last Modified on 11/20/2007



APPLIES TO

  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Standard X64 Edition
  • Microsoft SQL Server 2005 Standard Edition for Itanium-based Systems
  • Microsoft SQL Server 2005 Enterprise X64 Edition
  • Microsoft SQL Server 2005 Enterprise Edition for Itanium-based Systems



Bug #: 50001170 (SQL Hotfix)
Bug #: 507984 (SQLBUDT)

SYMPTOMS

When the Merge Replication Agent retries a connection in Microsoft SQL Server 2005, a memory leak may occur. This problem occurs only when the Merge Replication Agent is running continuously.

CAUSE

This problem occurs because the logic is incorrect when the Merge Replication Agent retries a connection. New threads are created when the Merge Replication Agent retries a connection. However, these threads are not destroyed correctly. This causes the memory leak.

WORKAROUND

To work around this problem, use one of the following methods:

  • Run the Merge Replication Agent on a schedule.
  • If you must run the Merge Replication Agent continuously, create a SQL Server Agent alert that is fired when a connection failure occurs in the Merge Replication Agent. The alert can be configured to run a SQL Server Agent job. The SQL Server Agent job can be configured to stop and then restart the Merge Replication Agent job when a connection failure occurs.


STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

When this problem occurs, you will notice an increase of the thread count for the Merge Replication Agent in Task Manager. The rate of the increase may vary depending on the polling interval that you specified for the Merge Replication Agent.


Additional query words: Merge handle leak memory leak thread leak handle count thread count hang

Keywords: kbtshoot kbprb kbexpertiseadvanced kbsql2005repl KB936891