Error: Services containing process crashed. ServiceName.GPServer instance has crashed
Error Message
ArcGIS for Server becomes unresponsive when publishing a geoprocessing service, and returns the following error message in ArcGIS Server logs:
Error: Services containing process crashed. ServiceName.GPServer instance has crashed.
Note: The ArcGIS for Server log files can be found in the following path: C:\arcgisserver\logs\<machine_name>\server
Cause
ArcGIS for Server is referencing an empty Python subkey. This can occur if a standalone Python installation occurred and was later removed. Uninstalling the standalone Python removes keys associated with the main Python hive but does not remove the main hive, which is empty because of the uninstall, and causes the error in the ArcGIS for Server logs.
Note: In Windows Registry, a hive is a logical group of keys, subkeys and values in the registry, which includes a set of associated files containing backups of its data.
Solution or Workaround
The following are possible solutions for this issue:
Configure the PythonPath key in the Windows Registry to reference the correct path
Note: The following instructions are meant to be used on a Microsoft Windows operating system.
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.
- Navigate to Windows Start.
- In the Search programs and files search bar, type regedit and open the Registry Editor.

- In the Registry Editor, navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.7\PythonPath and modify the registry value for the PythonPath subkey to reflect the correct installation path for Python.

- Register the correct Python installation path. Open the ab (default) icon and in the Edit String dialog box, under Value Data enter the correct installation path for the Python environment, and click OK.

Note: The following is an example of a complete path to a Python installation: C:\Python27\ArcGISx6410.3\Lib;C:\Python27\ArcGISx6410.3\DLLs;C:\Python27\ArcGISx6410.3\Lib\lib-tk
- Restart all geoprocessing services to reflect the new configuration. Refer to ArcGIS Server: Start and stop services for instructions.
Run a Repair on the ArcGIS for Server installation
The Repair function checks and repairs any missing or corrupt files in the operating system. The following Microsoft document provides instructions on how to repair an installation, Microsoft Support: Repair apps and programs in Windows.
Related Information
Last Published: 3/2/2022
Article ID: 000013609
Software: ArcGIS Server 10.9.1, 10.9, 10.8.1, 10.8, 10.7.1, 10.7, 10.6.1, 10.6, 10.5.1, 10.5, 10.4.1, 10.4, 10.3.1, 10.3, 10.2.2, 10.2.1, 10.2, 10.1, 10