Select to view content in your preferred language

Custom print service takes a long time to load

1074
6
05-15-2023 10:31 AM
Joshua-Young
Frequent Contributor

Our custom print services are taking around 20-45 seconds to load in the various print widgets when opening the print dialog depending on how many layout files are in the template folder. Checking the web traffic it is the "Get Layout Templates Info" task being called that is causing the delay.

The default print service also calls that task but it only takes 2 seconds to run. The custom print service that takes 20 seconds to load only has 5 layouts and the default print service has 8 layouts. It does not make sense to me why the default is faster.

Are there any best practices to speed up the Get Layout Templates Info task?

I am currently running ArcGIS Enterprise 11.1, but this has been a problem for us for several versions.

"Not all those who wander are lost" ~ Tolkien
6 Replies
A_Wyn_Jones
Esri Contributor

Where are your print templates being stored? If this is a shared network location, the NAS requirements will apply and specifically the requirement for immediate consistency:

https://enterprise.arcgis.com/en/server/latest/install/windows/choosing-a-nas-device.htm

This may also relate to a permissions issue/AntiVirus check on the service account running ArcGIS Server accessing the aforementioned folder. 

 

"We've boosted the Anti-Mass Spectrometer to 105 percent. Bit of a gamble, but we need the extra resolution."
0 Kudos
Joshua-Young
Frequent Contributor

The print templates are being stored locally on the ArcGIS Server server. They were being referenced using a UNC path but I have changed that to a direct path. I added antivirus exceptions to the print templates folder and the custom print service folder. Those changes had no affect on the duration.

The default printing tools service only takes a 2 seconds to get a response from the Get Layout Templates Info task and it is stored on the same local drive on the server with no antivirus exemptions. My custom print service has fewer layout templates than the default print service so it seems reasonable that the Get Layout Templates Info task would execute faster.

"Not all those who wander are lost" ~ Tolkien
0 Kudos
AndyWells
Frequent Contributor

I am having this exact same problem and just ran across this post while researching. In my case the print templates are stored directly on the server, and the directory is registered in ArcGIS Server. Most of the time, the print takes 45 seconds or longer. Every once in a while it will complete in less than 10. Still, other times it never completes. I'm not really sure what to try. Printing custom layouts is the main reason why we have ArcGIS Server/Enterprise since you can't do it in ArcGIS Online. Thanks.

0 Kudos
Adrian
by
Occasional Contributor

Did someone ever found a solution for this problem?

We are facing the same on our ArcGIS Enterprise environment. It takes 22s to get an answer from the Get Layout Templates Info task within a custom print service. However, we observe this behaviour only on our test environment, which has exactely the same specification and setup like the production environment (ArcGIS Enterprise 11.1 running on Windows server).

0 Kudos
Adrian
by
Occasional Contributor

I think I can answer my own question. We analyzed the problem and all comes down to the legend. Only one of our custom layout templates had a legend item and when we deleted this template, all of sudden the endpoint to the Get Layout Templates Info went back to normal 1-2 second respond time.

With further investigation we found out it's the legend item which is causing the problem. When you create a new legend from scratch, a legend item is generated automatically based on the data in the current map frame. This is handy because you want to design the lock & feel of the legend AND the legend item. However, before you save the layout as template used in a GP service, you have to delete the legend item. All the layout settings you set on the legend item remains in the template and the template can be parsed within 1-2 seconds.

We cannot say why it's working and what is going on behind the GP scenes. However, try it! It's working. Perhaps Esri can shed some light on this strange behaviour.

EDIT: Maybe it depends on the data in the layer which is used during the legend item styling. That could be the reason, why the same layout template with the legend item was fast on our productive system and slow on test. The test server could not access the data in this legend item and struggled parsing the template. I'm just guessing... please Esri take over.

0 Kudos
Joshua-Young
Frequent Contributor

I will test this out on our system and let you know what happens.

"Not all those who wander are lost" ~ Tolkien
0 Kudos