Microsoft KB Archive/277284

= Commerce OLE DB Provider Leaks Memory When You Repeatedly Load and Unload Csoledbprovider.dll =

Article ID: 277284

Article Last Modified on 10/16/2002

-

APPLIES TO


 * Microsoft Commerce Server 2000 Standard Edition

-



This article was previously published under Q277284



SYMPTOMS
When you repeatedly load and unload the Commerce OLE DB Provider (CSOLEDB) Csoledbprovider.dll that is included with Commerce Server 2000, an increase in the private bytes of the client process may occur.



CAUSE
The Commerce OLE DB Provider (CSOLEDB) maintains an error stack per thread in the thread local storage (TLS). This memory is not freed for all threads that have been created in the client process before the CSOLEDB provider was loaded into the address space of the client. This results in a memory leak that is proportional to the number of threads that were created before the CSOLEDB provider was loaded into the client's address space.



WORKAROUND
To minimize the effect of this problem, maintain a handle to the CSOLEDB provider until the process either shuts down successfully or is terminated abnormally. By doing this, Csoledbprovider.dll is not unloaded from memory, and the resulting memory leak is kept to a minimum.



STATUS
Microsoft has confirmed that this is a problem in Commerce Server 2000.

Keywords: kbbug kbpending KB277284

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.