Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

The BizTalk service restarts unexpectedly when you map large messages in BizTalk Server 2004


View products that this article applies to.

Symptoms

When you map large messages in Microsoft BizTalk Server 2004, the BizTalk service may restart unexpectedly. You may receive an error message in the Application log in Event Viewer that is similar to the following:
Event Type: Warning
Event Source: BizTalk Server 2004
Event Category: BizTalk Server 2004
Event ID: 5410
Description:
An error has occurred that requires the BizTalk service to terminate. The most common causes are an unexpected out of memory error and an inability to connect or a loss of connectivity to one of the BizTalk databases. The service will shutdown and auto-restart in 1 minute. If the problematic database remains unavailable, this cycle will repeat.

Error message: Exception of type System.OutOfMemoryException was thrown.

↑ Back to the top


Cause

This issue may occur if one of the following conditions is true:
  • Available memory is fragmented and contiguous memory is unavailable.
  • The transformation process has consumed all available memory.

↑ Back to the top


Workaround

To work around this issue, use one of the following methods:
  • Split large files into smaller files before you process the files in BizTalk Server 2004.
  • Use a custom application to map the large files outside BizTalk Server 2004. Then call the custom application from BizTalk Server 2004.

↑ Back to the top


More information

To map data, the Mapper in BizTalk Server 2004 passes a stream object that is loaded into an XPathDocument object. The XPathDocument object is processed by the XSLTransform class. To provide faster access to the data as the transformation process runs, the XPathDocument object stores information about the nodes of the XML together with the data itself. This behavior requires contiguous memory. Therefore, you experience a System.OutofMemoryException error when contiguous memory is unavailable or when the transformation process has consumed all available memory.

There is no specific file size threshold where the System.OutofMemoryException error occurs. We recommend that you fully test the following kinds of solutions before you deploy these solutions in a production environment:
  • Solutions that contain XML files of 1 megabyte (MB) or more
  • Solutions that require the processing of smaller flat files if these files will become larger when they are converted to XML in BizTalk Server 2004
  • Solutions that have all the kinds of messages that you expect in the production environment
Memory fragmentation may occur when smaller messages are processed in BizTalk Server 2004. This memory fragmentation may cause the issue that is mentioned in the "Symptoms" section when a larger message is processed.

The following scenarios may also cause System.OutofMemoryException errors:
  • Processing large messages by using the Business Rules Engine.
  • Processing large messages by using the Microsoft BizTalk Adapter for SQL Server.
  • Processing XML messages that contain very large CDATA sections. This issue can occur even when you stream data because CDATA sections cannot be split.

↑ Back to the top


References

For more information about the XPathDocument object, visit the following Microsoft Developer Network (MSDN) Web site:

↑ Back to the top


Keywords: KB913959, kbprb, kbtshoot, kbbtsmessaging, kbbtsmapper

↑ Back to the top

Article Info
Article ID : 913959
Revision : 3
Created on : 5/11/2007
Published on : 5/11/2007
Exists online : False
Views : 358