Automate InDesign Server start, stop, and restart
Features in censhare Render Client allow to automatically start, stop and restart InDesign Servers. This is useful to avoid high memory usage of InDesign Server which might lead to critical states within InDesignServer.
Important hints
The dot version must be supported by the client or in the server at css/app/modules/admin/cached_tables/indesign-version.xml, depending on server version or patch level. Without auto-start, everything works.
If you want to use the auto-start features, consider:
- Do not start InDesign Server instances yourself or by script.
- Do not run InDesign Server instances automatically, e.g. as a Windows service
The InDesign Server instances must be started by the censhare Render Client to be able to control them.
Functionality
This censhare Render Client is able to start, stop, and restart defined InDesignServer instances. On startup of the censhare Render Client - if defined - it starts the instances. During operation, the censhare Render Client is monitoring the instances. If an instance is closed, it will be restarted automatically. By monitoring parameters, instances will also be restarted automatically (only if an instance is not working on a render-job). If the censhare Render Client is closed -if defined - it will close the instances. To optimize system performance, instances are only opened one by one and not in parallel. Depending on system performance and instance amount it may take some minutes to start all instances (but doing this in parallel would be much slower and lame than the complete Render Client). On newer Render Clients it may need up to a minute until the InDesign Server appears.
Configuration
A GUI is available. The screenshot an overview of the functionality within the GUI. To enable the GUI, go to the menu 'File/Preferences/General' and deselect 'Detect layout processes automatically...'. Click the plus icon and define your instances as shown in the example below.
The censhare Render Client must be closed during editing the preference file.
Example
In the terminal, start the first instance with this command:
Windows
"C:\Program Files\Adobe\Adobe InDesign CS6 Server x64\InDesignServer.com" -configuration nameCS6p16001 -port 16001 -console
OS X
/Applications/Adobe\ InDesign\ CS6\ Server/InDesignServer.command -configuration nameCS6p16001 -port 16001
This is defined by the URL and app-params in the following XML. Additionally, the following example is an automatically starting instance, which is IDS CS6 on soap port 16001 using the 64-bit IDS application. IDS is automatically quit on close and is restarted at 02:00 o'clock in the morning and after every 64 calls/jobs.
For a better overview, two further instances are defined in the example restarting with an equal hourly delay of twenty minutes.
<xml> ... </windowmanager>
<render-services auto-detect-processes = "false" auto-start = "true" >
<render-service id = "adobe-indesign-server-cs6" protocol = "soap" enabled = "true" url = "http://localhost:16001" use-32bit = "false" quit-on-close = "true" app-params = "-configuration nameCS6p16001 -console" restart-pattern-cron = "0 2 * * *" restart-after-calls = "64" restart-max-wait-after-cancel = "30" />
<render-service id = "adobe-indesign-server-cs6" protocol = "soap" enabled = "true" url = "http://localhost:16002" use-32bit = "false" quit-on-close = "true" app-params = "-configuration nameCS6p16002 -console" restart-pattern-cron = "20 2 * * *" restart-after-calls = "64" restart-max-wait-after-cancel = "30" />
<render-service id = "adobe-indesign-server-cs6" protocol = "soap" enabled = "true" url = "http://localhost:16003" use-32bit = "false" quit-on-close = "true" app-params = "-configuration nameCS6p16003 -console" restart-pattern-cron = "40 2 * * *" restart-after-calls = "64" restart-max-wait-after-cancel = "30" />
</render-services> </xml>
It is recommended to spread the restarts equally over an hour, if you use hourly restarts to prevent a longer high CPU load caused by the restart. e.g.:
2 instances: "0 * * * *" and "30 * * * *"
3 instances: "0 * * * *", "20 * * * *" and "40 * * * *"
4 instances: "0 * * * *", "15 * * * *", "30 * * * *" and "45 * * * *"
and so on...
Example of restarts in the Admin Client Service Diagram
Definitions
boolean "auto-start" (default ="false") [enables or disables restart mechanism for all services listed below]
boolean "quit-on-close" (default ="true") [IDS will be shutdown on close of the renderer]
Must be activated to make possible an automatic restart of an instance after a restart of the renderClient.
boolean "use-32bit" (default ="false") [Force the renderer to start the 64-bit or 32-bit IDS]
string "restart-pattern-cron" (default ="" ; means disabled) [Restart based on a time interval]
int "restart-after-calls" (default ="0" ; means disabled) [Restart based on amount of calls]
int "restart-after-errors" (default ="0" ; means disabled) [Restart based on the amount of communication errors]
Hint: this works reliable with JDK 8 and the censhare-Render Client for it. It shouldn't be used in productive environments in lower versions.
int "restart-max-wait-after-cancel" (default ="0" ; means disabled) [Restart delay in seconds after an instance got stuck in condition "Cancelling running progress..."]
Hint: New feature since 17th of Dec. 2015 in releases >= 4.10 | Java8 RenderClient required on mac.
string "app-params" (default ="" ; means no params) [Additional params, passed over to IDS]
all params, except "app-params", can be set on node <render-services> and/or on the child nodes <render-service>
values on the child nodes <render-service>overload the value of the parent node <render-services>