Export map timeouts

1256
6
Jump to solution
11-11-2013 09:09 PM
MatejSkerjanc
Occasional Contributor
Hello guys
i'm discussing this with ESRI support already but I'm still wondering if anyone experienced this before, so i can get of their backs as well. 
I run an export task (be it from js app or rest interface) and if it timeouts the "print queue" breaks and i get old results on all the next successful prints until certain time has passed or server has been restarted (im uncertain about this fix though).


Regards
Matej
0 Kudos
1 Solution

Accepted Solutions
TracySchloss
Frequent Contributor
I had a similar problem myself.  Basically the PDF getting generated don't have unique names on them.  As the temporary files are cleared out (something that is happening on the AGS server side), the names are re-used.  But the browser remembers the name from before and shows you what it cached.  I had started out using the print widget, but switched to printTask instead. That way I was able to control the name of the output PDF, adding a date stamp that would make the name unique.  Then the browser wouldn't be drawing old cached PDFs.  This is maybe fixed at 10.2, but I'm still at 10.1. 

Here's a thread where this was discussed:

http://forums.arcgis.com/threads/87125-Synchronous-Custom-Printing-output-names-are-not-unique?highl...

View solution in original post

0 Kudos
6 Replies
JohnGravois
Frequent Contributor
what version/service pack for ArcGIS Server are you running?
0 Kudos
TracySchloss
Frequent Contributor
I had a similar problem myself.  Basically the PDF getting generated don't have unique names on them.  As the temporary files are cleared out (something that is happening on the AGS server side), the names are re-used.  But the browser remembers the name from before and shows you what it cached.  I had started out using the print widget, but switched to printTask instead. That way I was able to control the name of the output PDF, adding a date stamp that would make the name unique.  Then the browser wouldn't be drawing old cached PDFs.  This is maybe fixed at 10.2, but I'm still at 10.1. 

Here's a thread where this was discussed:

http://forums.arcgis.com/threads/87125-Synchronous-Custom-Printing-output-names-are-not-unique?highl...
0 Kudos
MatejSkerjanc
Occasional Contributor
Mr. John Gravis i think its 10.1 (base or maybe sp1 not certain)
Mr. Schlot I'm using print task as well, and i have already considered pushing in name but it disregarded it. I guess i was doing something wrong, since the parameters clearly state filename... Could you tell me to which params you've stuck it to? Oh i'll read the link you've provided.

Thank you both, saved me tons of troubles!


P.S. we're actually using async task and this still works (slow server causes timeouts). Anyhow thanks a ton again!
0 Kudos
TracySchloss
Frequent Contributor
Occasionally I do have my request time out while generating the PDF.  I haven't been able to pin it to whether it's my browser, or the way I have my print service defined.  It's not consistent enough to be repeatable by others in my office who have tried it.  I tried both synchronous and asynchronous configuration.  I wanted to have it set as asynchronous, but for some reason that never did work for me, so I had to switch.   It's also more of a problem on our production server as opposed to test, so maybe it's a permission problem too.

I think the whole function is in the other thread.  Here's the relevant section where the name is specified.

    var printTask = new PrintTask(printServiceUrl,printParams);
    deferred = printTask.execute(printParams);
       deferred.addCallback(function (response){
        var d = new Date();
        var dateTime =  d.getTime(); 
        var outputUrl = response.url + '?time=' + dateTime;  
        status.innerHTML = "";
        
        var select = registry.byId("templateSelect");
        var selectOptions = select.getOptions();
        select.set("value", "Choose Print Format");      
         window.open(outputUrl,"_blank");
        });
0 Kudos
MatejSkerjanc
Occasional Contributor
Schlot i've made a mistake, we're using sync service.
Our timeouts come from weak server (core2, since on quad core we have no issues). We've been in touch with ESRI support and this is what we came up with: weak server configuration since the export map is apparently quite a heavy load.
0 Kudos
YvanBérard
Occasional Contributor
I had this problem with Firefox 23, but now it seems to be Okay (i'm with ArcServer 10.1).

When an old print showed up, I just had to force refresh the print output (CTRL+F5) and the browser was forced to get the good print output.

Like schlot said, adding a timestamp at the end of the file name could be a good idea.
0 Kudos