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.
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.
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.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
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.
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