Until yesterday, all my published geoprocessing services and python scripts were working fine.
All of a sudden, during the execution of a script that has lots of calls of geoprocessing services, all python scripts stopped working. After this, every python execution returns the message above:
esriJobMessageTypeError: Traceback (most recent call last): File "...main.py", line 4, in import arcpy
File "d:\program files\arcgis\server\arcpy\arcpy\__init__.py", line 24, in <module>
from arcpy.toolbox import *
File "d:\program files\arcgis\server\arcpy\arcpy\toolbox.py", line 15, in <module>
from .ddd import ASCII3DToFeatureClass as ASCII3DToFeatureClass_3d
File "d:\program files\arcgis\server\arcpy\arcpy\ddd.py", line 23, in <module>
from arcpy.arcobjects.arcobjectconversion import convertArcObjectToPythonObject
File "d:\program files\arcgis\server\arcpy\arcpy\arcobjects\__init__.py", line 16, in <module>
from arcobjects import *
File "d:\program files\arcgis\server\arcpy\arcpy\arcobjects\arcobjects.py", line 17, in <module>
File "d:\program files\arcgis\server\arcpy\arcpy\arcobjects\mixins.py", line 15, in <module>
File "D:\Program Files\Python27\ArcGISx6410.3\Lib\collections.py", line 10, in <module>
from keyword import iskeyword as _iskeyword
ImportError: cannot import name iskeyword
Looking for some evidence, I found out that in the exact moment the script stopped working, the windows event viewer generated this log message
Windows successfully diagnosed a low virtual memory condition. The following programs consumed the most virtual memory: ArcSOC.exe (21672) consumed 2420084736 bytes, vapm.exe (3748) consumed 2265391104 bytes, and ArcGISPortal.exe (1532) consumed 926019584 bytes.
May this be the source of the problem? Maybe arcpy has been corrupted or something like that.
Can you help me?
Solved! Go to Solution.
So just initial thoughts, trust the Windows Event Viewer first and figure out if you do have a resource problem on that machine. You have an ArcSOC process using 2.4 GB, some vapm.exe process, (Kaspersky Anti Virus from a quick Google search) using 2.3 GB, and Portal using 9.2 GB. I'm surprised at Portal using that much memory, and is the ArcSOC process a service? You can turn on the Command Line column to check. Anyway, take a look at the available memory on the machine, (both physical and swap/virtual memory), and see if those are the constraints on the machine. To check the virtual memory, look at the Commited ration in the Task Manager:
Under your System > Advanced system settings > Advanced > Performance > Settings > Advanced > Virtual Memory, select Change and see if it's set to a Custom or Maximum Size, or if it's automatically managed by the system.