Stephen W. Thomas BizTalk Blog

100% Pure BizTalk
posts - 133, comments - 192, trackbacks - 427

My Links

News

Subscribe to my blog via:


Add to Google

Visit my website at:
www.BizTalkGurus.com

Archives

BizTalk 2004 Samples

BizTalk 2006 Samples

BizTalk Videos

BizTalk White Papers

BizTalkBlogs.com

Great BizTalk Blogs

Other Links

Large Messages Causing Large Problems in BizTalk Server 2004

Recently I have seen a lot of talk about large message support in BizTalk 2004.  The most interesting and depressing was on the BizTalk Core Engine WebLog.  It seems that large messages do not work as well in BizTalk 2004 as I would have hoped.

 

I have had success with some types of large messages using the file adapter and mapping.  I have gotten it to work with messages up to 500 MB but in a production environment this would not be a viable or supported solution. 

 

During some recent testing, I discovered the follow condition that rather surprised me.

 

Scenario

I was returning an unpredictable amount of data out of an Oracle database using .net code.  This data can be 1 MB or up to 250MB+ and needed to be processed in a single batch.  This data is then converted into Xml, cast to a message, and mapped with the results written to disk using a Send Shape.  Life was good until the extracted data returned was greater then 220 MB in size.

 

At this point, everything went downhill.  BizTalk Server began to have serious problems.  Receive functions were shutting down and I received the following Warning message in the Application Log:

 

A catastrophic failure occurred in the BizTalk service. The service will shutdown and auto-restart in 1 minute. If the database is still unavailable, this cycle will be repeated.

 

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

Error source:

 

BizTalk host name: BizTalkServerApplication Windows service name: BTSSvc{E93E7C4A-9E8B-40F6-AD7C-4F53B85F36C4}

 

For more information, see Help and Support Center at

 

All appears to be well and good since BizTalk seems to be handling the situation as expected... except for when the service actually starts again.  Since the Orchestration that caused the fatal error is still Active (the Orchestration itself did not through any errors), BizTalk starts to process the Orchestration from the last persistence point.  Thus, repeating the cycle in an endless loop.

 

Now, for the interesting behavior...  If this is running in a multi server BizTalk environment at the point the 1st BizTalk Server fails the 2nd one picks up; like I would expect.  I end up getting a completed Orchestration with no errors.  Super!  But, I only get a zero byte file as output.  So, looking inside HAT everything would look like it completed successfully with no errors.  Not good...

 

Overall, I found that an Orchestration seems to be able to handle about 440 MB of "stuff" before it crashes.  Just make sure you know what makes a copy of the message (like mapping).  Of course, processes with this amount of data would not be supported nor do I recommend actually doing it.  But, it has been fun to play around with and see what fails.

 

The moral of this story is to be very mindful of your message size.

Print | posted on Tuesday, March 29, 2005 11:33 PM |

Feedback

Gravatar

# re: Large Messages Causing Large Problems in BizTalk Server 2004

Well make sure everything you do with the xml is done in a streaming fashion.

Don't try to modify anything within an orchestration otherwise you will instantiate the message requiring 220 MB of free memory....

Another nice thin is what if 10 of those messages (but then 150 MB each) arrive at the same time....
3/31/2005 10:55 AM | Patrick Wellink
Gravatar

# re: Large Messages Causing Large Problems in BizTalk Server 2004

Go to my blog to see a configure that help me doing large message
8/8/2005 6:45 PM | hung
Gravatar

# re: Large Messages Causing Large Problems in BizTalk Server 2004

In my recent experience, this happened when we loaded in dozens of files of around 1 mb each (sequentially with 10 second gaps between them). Dont know whats happening inside the engine for such small files!!.
12/17/2005 1:06 PM | Benjy
Gravatar

# Upgrade to BizTalk server 2006

In previous versions of BizTalk Server, mapping of documents always occurred in-memory. While in-memory mapping provides the best performance, it can quickly consume resources when large documents are mapped. In BizTalk Server 2006, large messages will be mapped by the new large message transformation engine, which buffers message data to the file system, keeping the memory consumption flat.
12/22/2005 8:27 AM | Edmund Zhao
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 

Powered by: