ERROR

"Out of Memory" error occurs during Solve on a Closest Facility network analysis layer

Last Published: April 26, 2020

Error Message

When solving for a Closest Facility network analysis layer, the following error message occurs:

Error:   
"Error: Out of Memory"

Cause

The analysis is unable to complete due to a lack of necessary memory resources on the client machine. This is often the case for large network analysis tasks being performed on large network datasets, such as over 1+ million edges.

For hierarchical analysis of Closest Facility problem sets, the solve algorithm must perform simultaneous backwards searches across the network dataset from each facility. With large numbers of facilities across a large network dataset, this can easily exhaust memory resources.

For non-hierarchical analysis of Closest Facility problem sets, memory exhaustion can often result from the Closest Facility solver creating a traversal result that is too large to hold in memory.

Solution or Workaround

The Network Analyst Closest Facility solver can be made to 'chunk up' the processing behind the scenes, to complete very large analysis tasks using only standard memory configurations.

The 'chunking' sizes for processing can be adjusted for the Closest Facility solver by setting keys within the registry to fit your particular machine configuration. The following steps outline how to adjust these registry keys for the Closest Facility solver.
Note:
These keys are not in the registry by default. They may need to be created and set to the appropriate value.
Note:
When chunking is enabled, the Closest Facility solver will no longer be able to create traversal results, thereby disabling the generation of directions from any Closest Facility results.
Note:
At 10.1, the Closest Facility solver has been updated to support time-aware solves. The solver does not support chunking when the "Use Time" option is enabled.
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 Windows Registry Editor by clicking Start > Run. Type regedit and click OK.
  2. Expand the HKEY_CURRENT_USER\Software\ESRI\ key folder.
  3. Click on the NetworkAnalyst folder. If the NetworkAnalyst folder doesn't exist, create it by right-clicking on the ESRI folder and selecting New > Key. Rename the new key folder to NetworkAnalyst.
  4. Click  the ClosestFacility folder under the NetworkAnalyst folder. If the ClosestFacility folder doesn't exist, create it by right-clicking the NetworkAnalyst folder and selecting New > Key. Rename the new key folder to ClosestFacility.
  5. In the ClosestFacility folder, click on the value key ForceChunking. If the ForceChunking value key doesn't exist, create it by right-clicking the ClosestFacility folder and selecting New > DWORD Value. Rename the newly created value key to ForceChunking. Double-click the ForceChunking value key and modify it as appropriate.
    Note:
    This registry DWORD determines whether or not to apply chunking during solve, even if the solver is supposed to create a traversal result.  The default value of this key is 0 to ensure that, if the traversal result is needed, it will be created. To enable chunking for the Closest Facility solver, change this key to any non-zero value. If you force chunking by setting this key, the traversal result will be incomplete and some post-processing, such as generating directions, may not be possible.
  6. In the ClosestFacility folder, click on the value key FacilityChunkSize. If the FacilityChunkSize value key doesn't exist, create it by right-clicking the ClosestFacility folder and selecting New > DWORD Value. Rename the newly created value key to FacilityChunkSize. Double-click the FacilityChunkSize value key and modify it as appropriate.
    Note:
    This registry DWORD is only utilized by the solver when solving using hierarchies (since backward searches are simultaneously performed from all facilities when using hierarchies). The value determines the maximum number of facilities to search for at each step of the solve. The default value of this key is 500. By lowering the value of this registry key, this will reduce the overall memory usage per step, but may also increase solve time.
  7. In the ClosestFacility folder, click on the value key IncidentChunkSize. If the IncidentChunkSize value key doesn't exist, create it by right-clicking the ClosestFacility folder and selecting New > DWORD Value. Rename the newly created value key to IncidentChunkSize. Double-click the IncidentChunkSize value key and modify it as appropriate.
    Note:
    This registry DWORD is only utilized by the solver when solving without hierarchies. This value determines the maximum number of incidents to search from at each step of the solve. The default value of this key is 500. By lowering the value of this registry key, this will reduce the overall memory usage per step, but may also increase solve time.

Article ID:000012740

Software:
  • ArcGIS Engine
  • ArcMap

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic