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
see http://www.johnsansom.com/index.php/2009/03/sql-server-memory-configuration-determining-memtoleave-settings/
Error
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
Description:
Unexpected exception Exception.Message[Exception of type ‘System.OutOfMemoryException’ was thrown.]
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Solution
Setting the MemToLeave to 512MB solved the problem.