AnsweredAssumed Answered

Problems with geoprocessing service created in python

Question asked by torbjorn.dallokken4 on Dec 18, 2017
Latest reply on Dec 22, 2017 by xander_bakker


I'm experiencing some problems with a geoprocessing service which I've created, that I'm not able to figure out so I hope some of you have any suggestions. 


A bit of background:

I have a webapplication (created with webappbuilder) where the user can run a geoprocessing service (gp 1) to get some resulting points. The user is then going to run a second geoprocessing service (gp 2) which sends some information from the result to another external webservice. The users are not going to run the same geoprocessing service (gp 2) twice. 


The problem: 

I've created a script in python which reads the points from the last ran job (gp 1) and uses the library Zeep to connect to the external webservice. Inside the script, I've also added some functionality to find out whether the script has been run before or not.  I've published this as a geoprocessing service (gp 2) with some parameters. So far, so good. When I go to the webapplication and try to run this, it works well. If I try to run the script a second time, in the same session, I get the error "could not service request". I would like the output to be "The script has already been run", as defined in my script.  In ArcGIS Server Manager, the only information in the log is that the service has crashed. If I reload the webapplication, I can run the script once more and this time I get the right output.


Does anyone know or have any idea of why my geoprocessing service crashes, every second run?