I've been trying without success to transfer a functional script on my local drive to a shared server that my organization has read and write access to. The server is running ArcGIS Server 10.2.2, and my code is written in Python 2.7.10. I've noticed that the code hangs at a certain point, no errors or exceptions are thrown, the program just runs and chews up RAM until the process is cancelled. I let it run overnight and what should take under 20 seconds to complete still was not complete.
My script's purpose is to update an existing feature class in an existing file geodatabase while creating several backups and zip files for export and storage elsewhere. The code gets hung up on the line where it is attempting to copy an XY layer into a feature class on a local drive it shares with the script. Code sample below (failure at bold face font):
locations_Layer = db + "\\" + "locations_Layer"
arcpy.MakeXYEventLayer_management(inFolder + "\\locations.txt", "X_COORDINATE", "Y_COORDINATE", locations_Layer, "PROJCS['NAD_1983_CSRS_New_Brunswick_Stereographic',GEOGCS['GCS_North_American_1983_CSRS',DATUM['D_North_American_1983_CSRS',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Double_Stereographic'],PARAMETER['False_Easting',2500000.0],PARAMETER['False_Northing',7500000.0],PARAMETER['Central_Meridian',-66.5],PARAMETER['Scale_Factor',0.999912],PARAMETER['Latitude_Of_Origin',46.5],UNIT['Meter',1.0]];-28216700 -23260100 10000;#;#;0.001;#;#;IsHighPrecision")
print "Make xy event layer completed"
arcpy.FeatureClassToFeatureClass_conversion (locations_Layer, db, 'civic_addresses')
print "XY to FC conversion completed"
This process works flawlessly on my machine when writing to local and shared drives, but when run from the server infrastructure the script fails to function at this point in the code. I can upload the whole script if necessary.
Any guidance would be appreciated.