How to Fix 7-Zip Out of Memory Error

The "Out of memory" error in 7-Zip occurs when the compression settings demand more RAM than your system can allocate, often caused by excessively large dictionary sizes, too many CPU threads, or using a 32-bit version of the software. To resolve this issue, you must reduce 7-Zip's memory footprint by adjusting compression parameters, upgrading to the 64-bit client, or expanding your system's virtual memory.

1. Upgrade to 64-bit 7-Zip

If you are running the 32-bit version of 7-Zip, the application cannot access more than 2 GB to 4 GB of RAM, regardless of how much physical memory your computer has installed.

  • Open 7-Zip, click Help, and select About 7-Zip to check your version.
  • If it says 32-bit, uninstall it and download the 64-bit version matching your operating system.

2. Reduce the Dictionary Size

The dictionary size is the primary factor determining how much RAM 7-Zip requires. In LZMA and LZMA2 algorithms, memory consumption scales drastically with higher dictionary settings.

  • In the Add to Archive window, locate the Dictionary size dropdown.
  • Lower the value (for example, from 64 MB or 128 MB down to 16 MB or 32 MB).
  • Watch the Memory usage for Compressing field on the right side of the window to ensure the estimated usage stays well below your available physical RAM.

3. Decrease the Number of CPU Threads

7-Zip allocates separate memory buffers for each CPU thread it uses during compression.

  • Locate the Number of CPU threads option in the compression menu.
  • Lower the thread count. For instance, reducing the thread count from 8 to 4 will cut the overall memory requirement roughly in half for the same dictionary size.

4. Lower the Compression Level

Higher compression levels automatically configure large dictionary sizes and word sizes.

  • Change the Compression level from Ultra or Maximum down to Normal or Fast.
  • This drastically reduces memory demands while still maintaining acceptable file size reduction.

5. Switch Compression Method or Format

Different compression algorithms handle memory differently:

  • If using the .7z format, switch the Compression method from LZMA to LZMA2, as LZMA2 manages multi-threading and memory allocation more efficiently.
  • Alternatively, switch the Archive format to zip with the Deflate method, which requires negligible amounts of RAM.

6. Increase Windows Virtual Memory (Pagefile)

If you must use high compression settings and your physical RAM is limited, expand your paging file:

  • Press Windows Key + R, type sysdm.cpl, and hit Enter.
  • Go to the Advanced tab and click Settings under Performance.
  • Select the Advanced tab and click Change under Virtual memory.
  • Uncheck Automatically manage paging file size for all drives, select Custom size, and set a higher initial and maximum size to prevent memory exhaustion.