Kofax - Batches in Recognition Server stuck "In-Progress"

Applies to

Kofax Capture 11.x

Summary

An intermittent issue is occurring where some batches randomly stay "In-progress" in the Batch Manager under the Recognition Server queue. This happens even when the Recognition Service is stopped, rendering the batch unrecoverable and resulting in an error message: "You may not perform this operation in a transaction. Commit or rollback your pending transaction first."

Additionally, a Duplicate Key Entry error message is observed:

2021-10-07 01:44:03, 0x00000101, 1, 0x00000BCE, 0x00000000, 0x00000000, C:\Program Files (x86)\Kofax\Capture\Bin, , <ServerName>, , sessops.cpp, 578, Fatal database error - Duplicate value in index, primary key, or relationship. Changes were unsuccessful.: Violation of PRIMARY KEY constraint 'BatchStatisticsPr1'. Cannot insert duplicate key in object 'dbo.BatchStatistics'. The duplicate key value is (XXXX, XXXX). (2627)

(INSERT INTO BatchStatistics (StatisticsID,BatchID,ProcessID,UserID,StationID,StartDateTime,EndDateTime) VALUES (XXXX,XXXX,XXXX,'XXXX\User','ServerName',CONVERT(varchar(20), '<DateTime>', 126),CONVERT(varchar(20), '<DateTime>', 126))

When checking the StatisticsID, BatchID, and ProcessID, it is found that an entry has already been inserted. This can be verified by checking the last entry date, which is usually in the past.

Cause

This issue is linked to two TFS Bugs:

  • Bug 1184993: Error during PDF Generator processing causes mixed documents.

  • Bug 1621106: Random mixed documents occur once the batch runs through the PDF Generator.

Answer/Solution

A temporary workaround is to use the Kofax Capture Batch Removal Utility to export the affected batches. If needed for processing, these batches can be re-imported using the XML Import Connector (ACXMLAI.exe).

For a permanent solution, applying Fix 15174 is recommended. This fix should be installed on top of KC 11.0.1.2 (Fix Pack 2).

CASO Knowledge Base