OutOfMemoryException Processing Large File

We are loading a large flat file into BizTalk Server 2006 (Original release, not R2) - about 125 MB. We run a map against it and then take each row and make a call out to a stored procedure.

We receive the OutOfMemoryException during orchestration processing, the Windows Service restarts, uses full 2 GB memory, and crashes again.

The server is 32-bit and set to use the /3GB switch.

Also I've separated the flow into 3 hosts - one for receive, the other for orchestration, and the third for sends.

Anyone have any suggestions for getting this file to process wihout error?

Thanks, Krip

Answers


If this is a flat file being sent through a map you are converting it to XML right? The increase in size could be huge. XML can easily add a factor of 5-10 times over a flat file. Especially if you use descriptive or long xml tag names (which normally you would).

Something simple you could try is to rename the xml nodes to shorter names, depending on the number of records (sounds like a lot) it might actually have a pretty significant impact on your memory footprint.

Perhaps a more enterprise approach, would be to subdivide this in a custom pipeline into separate message packets that can be fed through the system in more manageable chunks (similar to what Chris suggests). Then the system throttling and memory metrics could take over. Without knowing more about your data it would be hard to say how to best do this, but with a 125 MB file I am guessing that you probably have a ton of repeating rows that do not need to be processed sequentially.


Where does it crash? Does it make it past the Transform shape? Another suggestion to try is to run the transform in the Receive Port. For more efficient processing, you could even debatch the message and have multiple simultaneous orchestration instances be calling the stored procs. This would definately reduce the memory profile and increase performance.


Need Your Help

Samsung Smart-TV SDK Internet Browser not available

html5 samsung-smart-tv television

I just recently downloaded and installed the Samsung Smart-TV SDK 4 (without the IDE, just the emulator). I'm doing this because I want to test the Web browser only, nothing else.

Spring-Boot processes HttpServletRequest before registered servlets

java spring spring-mvc tomcat servlets

The following code demonstrates the difference in HttpServletRequest processing a request between Spring-Boot and a stand-alone servlet container (aka. Tomcat or Jetty). Both work, however I am les...