Event Sender throws an OnTimer.Error regarding Value Cannot Be Null
Question / Problem:
Intermittently, batches that are processed with KAFC Workflow agent are throwing an error and will not show in the Insight\View dashboard.
------------
OnTimer.Error - System.NullReferenceException: Object reference not set to an instance of an object.
OnTimer.Error - System.ArgumentNullException: Value cannot be null.
------------
What could be causing the issue and, is there any method to resolve?
Answer / Solution:
The issue can be caused by a limitation of the available memory (RAM) for the listener. A full set of the errors within the KAFC_Listener.log has been included for reference, as follows:
2017-11-17 15:44:07,525 [24] ERROR [WebServerName:442] OnTimer.Error
System.NullReferenceException: Object reference not set to an instance of an object.
at PADService.BatchQueue.Shrink()
at PADService.BatchQueue.Cache(Batch b)
at PADService.KofaxCaptureDB.ImportBatchesCreatedAndDeletedInScan(Int32 max, Int32 unfinishedBatchTimeLimit, Int32 historyThreshold)
at PADService.Processor.AddToBatchQueueAndCheckForFinishedAndWrite(Boolean fetchKC)
at PADService.PADService.OnTimer(Object state)
----------------
2017-11-17 15:44:17,103 [24] ERROR [WebServerName:442] OnTimer.Error
System.ArgumentNullException: Value cannot be null.
Parameter name: key
at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
at PADService.KofaxCaptureDB.IsAutomatic(Session s)
at PADService.Session2.Compare(IFieldContainer fc, Boolean final, Boolean cfo)
at PADService.Session2.Compare(Boolean final)
at PADService.InsightDataDB.Buffer(Session2 s, Boolean doCleanup)
at PADService.Processor.AddToBatchQueueAndCheckForFinishedAndWrite(Boolean fetchKC)
Steps to Resolve:
- Backup the Web.Config file for each of the Event Senders (KAFC Listeners)
- Edit the App Setting for the MaxBatchCacheSize from the default value (3000), to a value of 1000000 (1 million)
- This setting limits the memory (RAM) consumed by the Listener. A value of 1000000 will effectively not limit the available memory.
- Complete an IISRESET on each of the Web Servers
- Test the behavior of KAFC to ensure data is processing without the same error.
Applies to:
Product | Version |
---|---|
KAFC | 2.0 |
KAFC | 2.1 |