PROBLEM
While solving a large closest facility, the following error message is returned:
Error: Out of memory
As Network Analyst solves an analysis, it compiles and temporarily stores intermediate information in memory. This information is referenced near the end of the solve process to find a solution. Once the solve process is completed, the information is cleared from memory.
This out-of-memory error message appears when the space available in the system’s memory is depleted before Network Analyst has finished storing all the necessary intermediate information.
One workaround is to solve the same network analysis on another computer that has more memory. Still, the analysis may be too large for that computer as well, or another computer may not be accessible. If either of these is the case, another possible workaround is to use 'chunking'. To enable chunking, change the registry key values so that Network Analyst breaks the analysis into smaller problems or 'chunks' and clears out the memory after solving each chunk.
Keep in mind that traversal results are not generated when chunking is applied. A traversal result is a list of the source features that were traversed during a network analysis. It is required to generate directions and to perform some other post-processes. Some functions in the ArcGIS Schematics extension, for example, require a traversal result as input. When chunking is used, it is unlikely that directions can be generated or post-processes can be performed after solving an analysis.
If a closest facility problem is being solved and the “Error: Out of memory” error message is being returned, consider using the OD cost matrix solver. The closest facility and OD cost matrix solvers perform similar tasks. The main differences are that closest facility can generate directions and output the true shape of routes between facilities and incidents. The OD cost matrix solver cannot generate directions, and the only lines it can produce are straight lines that directly connect origins and destinations. The closest facility solver is able to do more because it stores a traversal result, but that requires more memory and time to create. Therefore, if directions do not need to be generated or traversal results or the true shape of the routes do not need to be stored, try solving the same problem using OD cost matrix.
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.
Instructions provided describe how to configure chunking for closest facility layers.
Note: Network Analyst looks at this ForceChunking key value to determine whether it should apply chunking during a closest facility solve process. A value of 0 (zero) indicates that chunking should not be applied. Any non-zero value indicates chunking should be applied. The number 1 could be entered, for example, to turn chunking on.
Note: The value that is entered here determines the maximum number of facilities to search for at each step of the solve process when solving using a hierarchy. By default, Network Analyst searches simultaneously for 500 facilities. By entering a value that is less than 500, the maximum memory requirement is reduced, but the solve time may increase.
Note: The value that is entered here determines the maximum number of incidents to search for at each step of the solve process when solving without using a hierarchy. By default, Network Analyst searches for 500 incidents. By entering a value that is less than 500, the maximum memory requirement is reduced, but the solve time may increase.
Note: 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, once the analysis is complete, delete the key values that were just created.
Get help from ArcGIS experts
Download the Esri Support App