System.OutofMemoryException when processing large files
A client I have been working at has a very large message (150 mb message) that needs to be passed through BizTalk from the results of a stored procedure.
I was continually getting System.OutofMemoryException in the event log.
I read through this article and also this one both sites options did not appeal to me.
Another option is to use custom XSLT instead of the code inside of the map (which seems to stream the entire message into memory).
The solution is actually very easy:
- Create your map
- Inside of the mapper, create all of your links, functiods and everything
- Validate the map
- Take the XSLT that is generated and add it to your project
- In the mapper grid, point to the xslt (by following these instructions)
- Deploy it
It does not process the file very quickly, but it does not error, and I get the output.