Shutting down old jobs

There is a problem with old jobs lingering in a subsystem; they consume memory and stops old, inactive subsystems from timing out and shutting down. The original ideas about this was that the UI server could detect inactive clients and shut down their BE session, relieving foundation from old jobs. For several reasons this doesn't work, including clients that falls asleep, network connections that silently shuts down and more issues, especially with virtual machines and Citrix-setups.

Foundation will now start to shut down jobs that are considered old. Foundation measures age by keeping track of the time since the last job status change (a status change is a transition from one activity to another, e.g. reading different database records, communicating with the client, calling sub-programs). A status change contributes to the jobs activity level and, in essence, jobs with status change level of zero will be considered aging.

The server view or the foundation management pages for subsystems now contains the column: "Idle in" that indicates the time left before foundation consider this job too old and shuts it down.

  • When a job is idle, the column will count down from the configured idle time limit down to zero.

  • When the job has five minutes left of idle time before shutting down, the column will change color to yellow.

  • When one minute is left it will be red and when the time is up, the column will reverse colors so that the digits are red and the background is white.

This means that the next time the subsystems shuts down idle job, this job will be purged. There will be a log entry in the Coordinator stating the reason the job was shut down, and a note in the subsystem that the job was shut down due to inactivity. No dump logs, errors or warnings will be generated:

Coordinator log: 
2014-12-19 08:23:34,014 +0100Z INFO Coordinator Coordinator: 
A job was abnormally terminated. Job:MNS150 program:MNS150 user:12025. 
The job was terminated due to inactivity
 
Subsystem log: 
2014-12-19 08:23:34,011 +0100Z NOTE Subsystem Subsystem: 
 Purged 1 job from the subsystem
2014-12-19 08:23:34,013 +0100Z INFO Subsystem M3 Foundation: 
[MNS150] Job was terminated due to inactivity: mvx.app.pgm.MNS150
2014-12-19 08:23:34,013 +0100Z INFO Subsystem M3 Foundation: 
[MNS150] Finished MNS150 127.0.0.1:50940_1-0 

This mechanism is automatically activated with the new foundation and the default idle timeout value is 120 minutes.

The timeout value is configurable and the minimum value is one minute. Setting the value to zero will disable the mechanism.