Copy link to clipboard
Copied
Hi All,
I am using InDesign Server 2023 version on which I have created 20 InDesign instances. My 20 files flow simultaneously, but if a file on a certain port gets stuck, like in some script function, it occupies that port indefinitely, causing the processing of files on other ports to slow down as well. I wanted to know how I can identify that port and kill the process. Can anyone explain to me the internal mechanism for the behavior of InDesign instances?
Thanks In Advance
Copy link to clipboard
Copied
Would adding this to the script help?
console.log()
Wondering if Catch Blocks work for you
I'm not a coding expert and I've never worked on InDesign server so hang with me while I try my amateurish methods and see if it helps in anyway
try {
// Open and process each file
files.forEach(function(file) {
var document = app.open(file);
// Perform some processing on the document
// For example:
// document.exportFile(ExportFormat.PDF_TYPE, new File("/path/to/output.pdf"));
document.close();
console.log("File processed successfully: " + file.name);
});
} catch (error) {
// If an error occurs during processing, it will be caught here
// Log the error for troubleshooting
console.error("An error occurred:", error);
// You can also perform other actions, such as notifying the user or rolling back changes
} finally {
// Optional: Code that should always run, regardless of whether an error occurred
}
=======
I suppose we need more info - I am probably way off base.
Do you have more info on what's happening.
Maybe one of the scripting gurus would be better at this - or a pluging/app developer might be better.
Hope it helps somehow.
Copy link to clipboard
Copied
Something to keep in mind: If I'm not mistaken Adobe recommends only configuring the number of instances equal to the number of processors available in the machine... 20 instances to be equal to 20(+1) processor cores ...
Copy link to clipboard
Copied