Why multiprocessing is not working with GP service(ArcGIS for Server)?

994
2
Jump to solution
02-02-2018 02:04 AM
dineshpatil2
New Contributor III

Hello,

I have published one script tool as a GP service, and it is used to find closest facility for incidents with multi-processing functionality.

I have referred Create a script tool that uses multiprocessing to set properties of script tool.  It works fine in ArcMap, also executed through IDE (PyCharm) with hard coded input values.

I tried to execute the GP service through 'REST' end but it stuck at the point where multiprocessing is called. Below, I have attached the code snippet, and the script stuck after the highlighted syntax line. 

I was unable to figure out why this problem is occurred.

I have also published one sample script as a GP service which creates 4 KM buffer around point feature and clipped features from other feature class which falls within that buffer, and the scripts works fine through ArcMap  as well as  REST end of GP service.

But the GP service with 'find closest facility' for incident not working through GP service. Please help me out!

Thanks!

Dinesh Patil.

0 Kudos
1 Solution

Accepted Solutions
dineshpatil2
New Contributor III

Thanks Joshua!

I figured out the solution for the mentioned problem.

We have to set properties of GP tool in "Source" tab as "Python script out Process" (means uncheck "Run Python script in Process").

After setting the above properties run the GP tool and publish its result as GP service as per regular process.

Regards,

Dinesh Patil.

View solution in original post

2 Replies
JoshuaBixby
MVP Esteemed Contributor

Looking at Geoprocessing service settings: Parameters—Documentation | ArcGIS Enterprise :

ParameterExplanation

Show Messages

You can return messages of varying levels to the client that executed your geoprocessing service.

  • None: (default) No geoprocessing messages are returned to the client, only whether the execution was successful or failed.
  • Error: Only tool messages that produce an error are returned to the client.
  • Warning: All tool error and warning messages are returned to the client.
  • Info: All tool messages from execution are returned to the client.

Caution:

All messages, regardless of level, may contain dataset paths and names, and this may pose a security risk. The Info level is verbose and typically contains more references to dataset paths and names. In general, you will want to return messages during development but turn them off in production.

Learn more about message types and severity in geoprocessing

Since the default is None, did you change the Show Messages setting when publishing the geoprocessing service?

0 Kudos
dineshpatil2
New Contributor III

Thanks Joshua!

I figured out the solution for the mentioned problem.

We have to set properties of GP tool in "Source" tab as "Python script out Process" (means uncheck "Run Python script in Process").

After setting the above properties run the GP tool and publish its result as GP service as per regular process.

Regards,

Dinesh Patil.