Blog on software engineering
System.OutOfMemoryException on SSIS Script Task

System.OutOfMemoryException on SSIS Script Task

I created a SSIS package with a script task in it. The script task created a XML file, but consumed more then 256MB of memory. The default value for the MemToLeave setting.

MemToLeave is virtual address space (VAS) that’s left un-used when SQL Server starts so that external components called by SQL Server are saved some address space. So in order for these technologies, .NET CLR and SSIS, to operate


Event Type:    Error
Event Source:    SSIS Package CDS Rapportage
Event Category:    None
Event ID:    3
Date:        4/21/2009
Time:        12:59:29 PM
User:        N/A
Computer:    NLPRC173N59
Unexpected exception Exception.Message[Exception of type ‘System.OutOfMemoryException’ was thrown.]

For more information, see Help and Support Center at



Setting the MemToLeave to 512MB solved the problem.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.