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

Article ID: 2672009 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

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.

CAUSE

The large-file-chunk-size property is set to maximum value of 2,147,483,647 (in bytes) as per http://msdn.microsoft.com/en-us/library/system.int32.maxvalue.aspx) or 2,147,483,648 bytes as per http://technet.microsoft.com/en-us/library/cc262061(office.12).aspx).

Note: The "real" maximum value is '2147483647' and not '2147483648'.

RESOLUTION

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

or

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

MORE INFORMATION

Large-file-chunk-size: Stsadm property: http://technet.microsoft.com/en-us/library/cc262061(office.12).aspx

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.

Properties

Article ID: 2672009 - Last Review: February 13, 2012 - Revision: 4.0
APPLIES TO
  • Microsoft Office SharePoint Server 2007
Keywords: 
KB2672009

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com