Good Day
I'm trying to print a large view of ~4600 segment, after pressing the print button, which executes the following function:
printMap() {
try {
const printTask = new PrintTask();
printTask.url = 'https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task';
const template = new PrintTemplate({
format: 'jpg',
layout: 'a4-landscape',
});
const params = new PrintParameters({
view: this._view,
template: template
});
this.printProgress = true;
printTask.execute(params).then((result) => {
this.printProgress = false;
window.open(result.url);
}, (err) => {
this.printProgress = false;
this.alert.errorDialog('Print Error', 'Please try again or contact support!');
});
} catch (error) {
console.log(error);
}
}
I get 'cancelled' in the network tab of the Dev Console:
I'm assuming this is a timeout issue, due to the amount of data being sent, is there a way to add a timeout override to the execute call? Is there an upper limit to the amount of data you can push from a client side ArcGIS JS Map to the Print Service?
Thanks
You can try providing a requestOptions object as the second arg of the execute command that sets the timeout to 0.
https://developers.arcgis.com/javascript/latest/api-reference/esri-request.html#RequestOptions
Thanks! I'll try that 🙂
After changing the timeout to 0, I'm no longer getting the cancelled request, but I'm getting lots of 500 / 504 errors.
The 200 at the top had a 500 response inside it:
I ran the same test several more times, and was able to get a response, and the only different I can see is that the successful one took 1.9 minutes, and all the failures took 1.0 minutes or 2.0+ minutes.
This is the capture of the other responses, the top 200 was actually successful, the second was had a 500 response code it:
Thanks
Has anyone seen this kind of behaviour?