Skip to main content

Configure KCM Core for handling long-running jobs


KCM Core can be configured to handle unexpected situations. For example, to handle the situation where someone created an infinite loop in a template and the document composition for this template runs indefinitely. This article describes what setting can be changed to handle such kind of situations.

Job Recovery

In KCM Core you can configure multiple settings for stopping a job in case a Document Processor appears to hang. For example, due to a template with an infinite loop being run.
1). Open KCM Core Administrator.
2). Go to tab Job Recovery.
3). Configure the following settings under Job Control.
Terminate jobs after XX seconds when running Interactive jobs.
Terminate jobs after XX seconds when running Batch jobs.

This is the maximum time allowed for a job to run. After this timeout, the job is stopped forcefully, and the document processor is restarted. Optionally you can configure a grace period before that Document Processor is restarted. The configured job time out should be much higher than the maximum time a job normally needs for completion. It is a safety net. For example, if the longest job requires 20 seconds, you could pick 3600 seconds (one hour). In an unexpected situation where a job appears to be hanging, the Document Processor will be automatically available again after one hour.
4). Configure “Terminate SendFile/ReceiveFile after XXX seconds”.
This configures a general time out for the SendFile/ReceiveFile core scripting commands. When no timeout is specified for a SendFile/ReceiveFile command, the Document Processor will wait indefinitely for the client to respond (as documented). In a situation where the programmer forgot to configure a timeout for SendFile/ReceiveFile command and the client does not respond, then this general timeout can prevent a Document Processor from waiting indefinitely on the client. Typically, 60 seconds is a safe value.
5). Click Save&Apply to apply the new settings.



You can configure KCM Core to notify an operator through the Event Log or by email if any KCM Core job exceeds the configured time. This allows an informed operator to take action when a job requires more time than expected. To activate this feature, add the following settings to the [Configuration] section of the dp.ini file in the KCM Core setup (..\KCM\Work\<version>\instance_nn\core\config\dp.ini).

Note: Ensure that all KCM Core Administrators are closed before adjusting the file dp.ini. After any adjustments are made, the KCM Core and KCM Document Processors need to be restarted in order to apply the changes.

; Notification settings

The following is a description of the settings.
Amount of time (in seconds) before a notification is sent.
Hostname of the Windows server where the event is to be logged.
Email address used to send emails. This address appears in the FROM: header.
A comma-separated list of email addresses of recipients who will receive the notification.
SMTP server used to send the notification. The SMTP server must allow sending emails without authentication or this must be the SMTP server of the recipients.

Note: There are no defaults for these settings. If one of them is omitted, the appropriate notifications are not sent. Notifications are sent while the job is still being processed. The status of the job is not affected. If the job finishes while the notifications are still being sent, the KCM Document Processor waits until these notifications are completed.

Note2: To see the actual description of a logged event, the DLL file ITPServerMSG.dll must be registered on the machine where the event is viewed. The DLL file is located at ..\KCM\Programs\<version>\ITP Server\Bin\. The Windows program regsvr32.exe can be used for registering this DLL file: "regsvr32.exe ITPServerMSG.dll"

  • Was this article helpful?