ERROR

Out of Memory" error occurs during a solve on an OD cost matrix or vehicle routing problem network analysis layer

Last Published: April 25, 2020

Error Message

While solving a large origin-destination (OD) cost matrix or vehicle routing problem (VRP) network analysis layer, the following error message is returned:

“Error: Out of memory”.

Cause

During the analysis process, ArcGIS Network Analyst compiles and temporarily stores intermediate information in memory. This information is referenced near the end of the solve process. After the solve process is complete, the information is cleared from memory.

This out-of-memory error message appears when the system’s memory is depleted before Network Analyst has finished storing all the intermediate information.

Solution or Workaround

One workaround is to use a computer that has more memory. Still, the analysis may be too large for that computer as well, or another computer may not be accessible.

Another workaround is to use 'chunking.' In chunking, the registry key values are changed, causing Network Analyst to break the analysis into smaller problems or 'chunks,' and clearing the memory after solving each chunk. This approach only works for some types of network analysis layers — it depends on whether Network Analyst needs to store information in memory for the entire analysis or if it can break the analysis into smaller portions. The vehicle routing problem internally creates an OD cost matrix and therefore indirectly supports chunking.

At ArcGIS 10, the OD cost matrix solver was redesigned to significantly improve scalability, thereby making chunking unnecessary. As a result, chunking is not supported for the OD cost matrix analysis or VRP layers starting with the release of ArcGIS Version 10.

Chunking with the OD cost matrix solver is an option with ArcGIS 9.2, 9.3, and 9.3.1. Upgrading to the current version of ArcGIS resolves any memory issues during an analysis.

Another potential alternative to chunking the OD cost matrix layer is using a cutoff, which can reduce the size of the solution and, thus, memory requirements. If the alternatives do not work, follow the steps below to configure chunking for the OD cost matrix solver.

The following sections outline how to configure chunking for OD cost matrix and, indirectly, VRP layers.

Warning:
The instructions below include making changes to essential parts of your operating system. It is recommended that you backup your operating system and files, including the registry, before proceeding. Consult with a qualified computer systems professional, if necessary.
Esri cannot guarantee results from incorrect modifications while following these instructions; therefore, use caution and proceed at your own risk.

  1. Open the Registry Editor.
    ▪ In Windows XP, click Start > Run, type regedit, and click OK.
    ▪ In Windows 7 or Vista, click Start, type regedit in the search text box, then press Enter.
  2. Expand the following keys, which look like folders: HKEY_CURRENT_USER > Software > ESRI.
  3. Click the NetworkAnalyst key.
    ▪ If the NetworkAnalyst key does not exist, create a key by right-clicking on the key that is one level above (ESRI) and click New > Key. Rename the new key NetworkAnalyst.
    ▪ Several steps below require the creation of a key in the registry. To do that, follow the same procedure that was just used; right-click the key in which to create the new key and select New > Key, then rename the new key to match the name given in the step.
  4. In the NetworkAnalyst key, create a key named ODCostMatrix if it does not already exist.
  5. Double-click ODCostMatrix.
  6. In the ODCostMatrix key, look for the DWORD key value named DestinationChunkSize. Create it if it does not exist.
  7. Double-click DestinationChunkSize to open the Edit DWORD Value dialog box.
  8. In the Edit DWORD Value dialog box, click Decimal and enter an integer between one and 1000 in the Value data text box.
    ▪ The value that is entered here determines the maximum number of destinations to search for at each step of the solve process when solving using a hierarchy. By default, Network Analyst searches for 1000 destinations. By entering a value that is less than 1000, the maximum memory requirement is reduced, but the solve time may increase.
  9. In the ODCostMatrix key, look for the DWORD key value named OriginChunkSize. Create it if it does not already exist.
  10. Double-click OriginChunkSize to open the Edit DWORD Value dialog box.
  11. In the Edit DWORD Value dialog box, click Decimal and enter an integer between one and 1000 in the Value data text box.
    ▪ The value that is entered here determines the maximum number of origins to search for at each step of the solve process when solving without using a hierarchy. By default, Network Analyst searches for 1000 origins. By entering a value that is less than 1000, the maximum memory requirement is reduced, but the solve time may increase.
  12. Solve the OD or VRP analysis layer in ArcMap.
  13. Finally, delete the key values that were created in the steps above.
    ▪ The only way to determine whether chunking is enabled is by looking in the registry for the key values mentioned above. Therefore, to ensure that chunking is not being used in any future analysis, delete the key values that were just created, once the analysis is complete.

Article ID:000011106

Software:
  • ArcMap

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic