Deletion of Abandoned Lock Files

When a thread dies before a lock is released, it could result in abandoned lock files. Purging such lock files is necessary. In a clustered setup, only the cluster member server that created the lock can purge it later.

The Node ID information added to the lock file when it was created is used when purging the abandoned locks during server startup time.

The server checks for an existing lock file. If the lock file exists, the server opens it, reads the Node ID information, and determines whether it is the same instance on the same host who created the lock file. If they are same, the server assumes that the lock was abandoned and deletes the lock file.

Note: The abandoned lock can only be removed when the correct server comes back up again. During the cluster member downtime other cluster members cannot perform the scheduled task.

The lock files created can be deleted manually from the following directories:

  • Revivifier: $MQ_HOME/Work/MqRevivify.lock
  • FileWatcher: Location specified in the FileWatcher.xml file.