AnsweredAssumed Answered

Print geoprocessing service runs very slow on the first run

Question asked by goro13 on Feb 14, 2018
Latest reply on Mar 2, 2018 by goro13

Hello,

I’ve developed a custom print service for ArcGIS Server using a very similar approach to this one. When this service is called for the first time in a day, it times out or it requires 20-30 mins to complete. After this happens, everything seems to be back to normal and the service runs in approx. 2-3 mins. I would much appreciate any thoughts of why this is happening or how it can be fixed.

 

Please find details below:

ArcGIS Servers (10.4.1) geoprocessing service config:

  • Execution mode: Asynchronous
  • Minimum/ Maximum number of instances per machine: 1/4
  • The maximum time a client can use a service: 1800 secs
  • The maximum time a client will wait to get a service: 400 secs
  • The maximum time an idle instance can be kept running: 1800 secs
  • Run instances of this configuration: In a separate process for each instance (high isolation)
  • Recycle this configuration every: 24 hours, Starting at: 00:00

ArcGIS Server logs:

  • Processing request took longer than the usage timeout for service ../Print.GPServer'. Server request timed out. Check that the usage timeout is appropriately configured for such requests.

Python script info:

  • Imports: arcpy, os, uuid, json
  • A template which has all the layers (approx. 80) of the web map is being used to compare the legend entries with the ones from the web app. The main purpose of it is to use the symbology of the template, not the one used by the web app. The template references Feature Classes stored in Oracle.

General remarks:

  • If I capture the JSON string sent to the server by the print widget and run it locally in ArcMap, it always completes in less than 2 minutes
  • I think it is related with the service being recycled each night at 00:00 which is why the first run takes so long

NB:

I would be interested to know if there is another option rather than just increasing the time a client can use this service (I’ve got 30 mins already)

Outcomes