Problem with Python execution using arcpy - ArcGIS Server

Jump to solution
06-02-2016 01:00 PM
New Contributor II

Hi everyone,

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 "", line 4, in import arcpy

File "d:\program files\arcgis\server\arcpy\arcpy\", line 24, in <module>

from arcpy.toolbox import *

File "d:\program files\arcgis\server\arcpy\arcpy\", line 15, in <module>

from .ddd import ASCII3DToFeatureClass as ASCII3DToFeatureClass_3d

File "d:\program files\arcgis\server\arcpy\arcpy\", line 23, in <module>

from arcpy.arcobjects.arcobjectconversion import convertArcObjectToPythonObject

File "d:\program files\arcgis\server\arcpy\arcpy\arcobjects\", line 16, in <module>

from arcobjects import *

File "d:\program files\arcgis\server\arcpy\arcpy\arcobjects\", line 17, in <module>

import mixins

File "d:\program files\arcgis\server\arcpy\arcpy\arcobjects\", line 15, in <module>

import collections

File "D:\Program Files\Python27\ArcGISx6410.3\Lib\", 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?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
New Contributor II

I deleted all .pyc files from "D:\Program Files\Python27\ArcGISx6410.3\Lib" folder and the python scripts that call arcpy back to work.

View solution in original post

0 Kudos
3 Replies
Esri Frequent Contributor

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.

New Contributor II

About the memory problem I already headed for the infraestructure departament. Thank you for the tips.

0 Kudos
New Contributor II

I deleted all .pyc files from "D:\Program Files\Python27\ArcGISx6410.3\Lib" folder and the python scripts that call arcpy back to work.

0 Kudos