Microsoft KB Archive/292599

= FIX: BizTalk Server May Use All Available System Memory =

Article ID: 292599

Article Last Modified on 11/15/2007

-

APPLIES TO


 * Microsoft BizTalk Server 2002 Standard Edition

-



This article was previously published under Q292599



SYMPTOMS
BizTalk Server may try to use up all available system memory when it is processing a large number of large documents.



CAUSE
The current design of BizTalk causes the system to run out of memory.



Service Pack Information
To resolve this problem, obtain the latest service pack for Microsoft BizTalk Server 2002. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

815781 How to Obtain the Latest BizTalk Server 2002 Service Pack

Hotfix Information
A supported hotfix is now available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. To create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.   Date         Time   Version     Size     File name --  24-Jun-2002  22:35  3.0.1524.0   53,520  Btsshim.dll 12-Jul-2002 22:25  3.0.1524.0  131,344  Cisapi.dll 12-Jul-2002 22:25  3.0.1524.0  524,560  Ciscore.dll 12-Jul-2002 22:25  3.0.1524.0  405,776  Cisengine.dll 12-Jul-2002 22:25  3.0.1524.0  348,432  Mscis.exe 11-Apr-2002 16:41               19,632  Sq_priorityupgrade.sql 11-Apr-2002 16:41               13,680  Btm_priorityupgrade.sql NOTES  For each computer that is running BizTalk Server and for each database group, Btm_priorityupgrade.sql must be executed against the BizTalk InterchangeBTM database, and Sq_priorityupgrade.sql must be executed against the BizTalk InterchangeSQ database. To do this, you must use the SQL Query Analyzer to execute the stored procedures against the affected BizTalk databases. This fix also includes the fix for Q319450 and this functionality can be obtained by reading Q319450. This fix must include these installation steps because the schema change that was made for Q319450 is also present in this fix.For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

319450 INFO: BizTalk Priority-Based Message Processing Improvement



After you apply this fix, you can use the following registry value to control the batch size that BizTalk Server worker threads use. Reducing the batch size reduces the memory used by BizTalk Server.

Add the DWORD value of MaxReceiveBatchByteSize under the following registry key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\BTSSvc

The batch size is measured in kilobytes (KB). By default, the size is 1000 KB.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

This problem was first corrected in Microsoft BizTalk Server 2002 Service Pack 1.



MORE INFORMATION
By design in BizTalk Server, a receive worker thread is responsible for pulling a message into the messaging engine. The size of the message is frequently doubled when the message is converted to UNICODE. By default, these messages are then batched in groups of 20, and another worker thread processes the batch. The number of receive worker threads is based on the number of processors and the BizTalk Server settings.

This issue was first identified on an eight-processor system with 4 GB of memory. In this case, a BizTalk Server was configured to deliver messages directly to a channel, and the channel converted the message from schema A to schema B. The channel ended in a port that wrote the messages to the file system.

By default, in the case where a system has eight processors installed, BizTalk Server uses four worker threads per processor. If the converted UNICODE message is 2 MB in size and the BizTalk Server demand is such that all of the receive worker threads are being used, the memory requirements are 1.28 GB (that is, the number of threads times the number of processors is multiplied by the batch size times the size of the message, or 32 x 40) to process these messages. This does not include the working memory for the process, the memory requirements for MSXML, the required memory for COM, the required memory for the MDAC components, or the memory requirements for any additional COM components that are loaded in the BizTalk memory space.

When the memory failures were examined, it was noted that the memory failures were frequently not related to BizTalk. The Event log was full of memory-related failures, and these failures occurred because the various memory allocators failed when a virtual allocation request was made. The process returns C0000017, which resolves to STATUS_NO_MEMORY.

Additional query words: SRX020225604072

Keywords: kbhotfixserver kbqfe kbbiztalk2002sp1fix kbbug kbfix KB292599

-

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

© Microsoft Corporation. All rights reserved.