You are currently offline, waiting for your internet to reconnect

SharePoint 2007: 'Save site as Template' option fails with an 'Out of memory' exception

Consider the following scenario:

You try to save a document library, list, or site as a template in a SharePoint 2007 environment. However, the operation fails and you receive any of the following errors:

- "Server Out Of Memory. There is no memory on the server to run your program. Please contact your administrator with this problem".
- "Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))" 

You have verified that the server has available memory.
The large-file-chunk-size property is set to maximum value of 2,147,483,647 (in bytes) as per or 2,147,483,648 bytes as per

Note: The "real" maximum value is '2147483647' and not '2147483648'.
The large-file-chunk-size property specifies the amount of data that can be read from the server at one time. This means that the entire file is being processed in memory (as opposed to saving it on the disk). While performing this operation, the server tries to allocate more than acceptable memory (maxint+1) and throws an out of memory exception. It then attempts to cleanup and free some memory that was not allocated and runs into an 'Access Violation' error which is sent back as a 'disp_E_exception' message.

It is highly recommended that you balance the chunk size property between the default of 5 MB (5,242,880 bytes) and 2 GB (2,147,483,646 bytes) to avoid running into memory issues.

For example, run the following command to set the large-file-chunk-size property to 1,073,741,824 bytes (1024 MB)
Stsadm -o setproperty -pn large-file-chunk-size -pv 1073741824

After making a change to this property, perform an IISreset by typing IISreset at a command-line prompt.

To view the current setting of the large file chunk size property, use the following syntax:

Stsadm -o getproperty -pn large-file-chunk-size –url http://server_name


Stsadm -o getproperty -pn large-file-chunk-size

Large-file-chunk-size: Stsadm property:

Exception; Saving Site Template; SharePoint
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Article ID: 2672009 - Last Review: 02/13/2012 17:41:00 - Revision: 4.0

Microsoft Office SharePoint Server 2007

  • KB2672009