Deadlocked Error During garbageCollectTaskPersistence - Identity Manager
search cancel

Deadlocked Error During garbageCollectTaskPersistence - Identity Manager

book

Article ID: 259637

calendar_today

Updated On:

Products

CA Identity Suite CA Identity Manager

Issue/Introduction

Running the garbageCollectTaskPersistence stored procedure can result in a deadlock error if other database tasks are occurring simultaneously. This article outlines the cause of this conflict and provides recommendations for managing task cleanup.

Environment

Identity Manager 14.5 & 15

Cause

A deadlock occurs when the garbageCollectTaskPersistence stored procedure and the archiveTaskPersistence stored procedure operate on the same resources simultaneously.

  • garbageCollectTaskPersistence is designed to delete records from Task Persistence tables.
  • archiveTaskPersistence deletes records from Task Persistence tables and inserts them into Archive database tables.

Running both processes concurrently triggers lock contention as both procedures attempt to access the same database items.

Resolution

To prevent deadlocks and ensure database stability, follow these guidelines:

  1. Avoid Overlapping Procedures: Do not run garbageCollectTaskPersistence and archiveTaskPersistence at the same time.
  2. Evaluate Necessity: If you are archiving data using archiveTaskPersistence, running garbageCollectTaskPersistence is generally unnecessary, as archiving provides a more comprehensive maintenance path.
  3. Manage Archive Tables: If you need to remove records from the Archive database tables, use the archive_gcTaskPersistence stored procedure.
  4. Schedule Accordingly: If you must use multiple cleanup procedures, ensure they are scheduled to run sequentially, ensuring one process completes fully before the next begins.

Additional Information

To speak with a customer representative or a Support Engineer see Contact Support. Scroll to the bottom of the page and click on your respective region.