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.
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)