Alarm could not be acknowledged. It may no longer be registered

We have been experiencing some issues with log messages when we clear out alarms showing the following type entries. If only a few alarms are acknowledged this does not cause any issues, but if there are several alarms this can cause the client to freeze for some time which is troublesome for us as our HMI is not responsive during this time. We are using Ignition v7.9.3.

INFO   | jvm 1    | 2017/10/16 14:00:57 | W [a.Manager                     ] [18:00:57]: An alarm could not be acknowledged. It may no longer be registered. Event details: b7b760c2-9839-43f8-9d73-4ddac33ec9d9 / {{ackUser=usr-prov:default:/usr:level1, eventTime=Mon Oct 16 14:00:57 EDT 2017}} request-origin=127.0.0.1, session-user=level1, session-project=UT3DrawTowerHmi, session-id=32964AC1
INFO   | jvm 1    | 2017/10/16 14:00:57 | W [a.Manager                     ] [18:00:57]: An alarm could not be acknowledged. It may no longer be registered. Event details: a6490b29-3073-4592-949d-adde96074996 / {{ackUser=usr-prov:default:/usr:level1, eventTime=Mon Oct 16 14:00:57 EDT 2017}} request-origin=127.0.0.1, session-user=level1, session-project=UT3DrawTowerHmi, session-id=32964AC1
INFO   | jvm 1    | 2017/10/16 14:00:57 | W [a.Manager                     ] [18:00:57]: An alarm could not be acknowledged. It may no longer be registered. Event details: a3935c2e-9dd6-4469-9522-16c6a88a7691 / {{ackUser=usr-prov:default:/usr:level1, eventTime=Mon Oct 16 14:00:57 EDT 2017}} request-origin=127.0.0.1, session-user=level1, session-project=UT3DrawTowerHmi, session-id=32964AC1
INFO   | jvm 1    | 2017/10/16 14:00:57 | W [a.Manager                     ] [18:00:57]: An alarm could not be acknowledged. It may no longer be registered. Event details: b7b760c2-9839-43f8-9d73-4ddac33ec9d9 / {{ackUser=usr-prov:default:/usr:level1, eventTime=Mon Oct 16 14:00:57 EDT 2017}} request-origin=127.0.0.1, session-user=level1, session-project=UT3DrawTowerHmi, session-id=32964AC1
INFO   | jvm 1    | 2017/10/16 14:00:57 | W [a.Manager                     ] [18:00:57]: An alarm could not be acknowledged. It may no longer be registered. Event details: a6490b29-3073-4592-949d-adde96074996 / {{ackUser=usr-prov:default:/usr:level1, eventTime=Mon Oct 16 14:00:57 EDT 2017}} request-origin=127.0.0.1, session-user=level1, session-project=UT3DrawTowerHmi, session-id=32964AC1
INFO   | jvm 1    | 2017/10/16 14:00:57 | W [a.Manager                     ] [18:00:57]: An alarm could not be acknowledged. It may no longer be registered. Event details: a3935c2e-9dd6-4469-9522-16c6a88a7691 / {{ackUser=usr-prov:default:/usr:level1, eventTime=Mon Oct 16 14:00:57 EDT 2017}} request-origin=127.0.0.1, session-user=level1, session-project=UT3DrawTowerHmi, session-id=32964AC1
INFO   | jvm 1    | 2017/10/16 14:00:57 | W [a.Manager                     ] [18:00:57]: An alarm could not be acknowledged. It may no longer be registered. Event details: b7b760c2-9839-43f8-9d73-4ddac33ec9d9 / {{ackUser=usr-prov:default:/usr:level1, eventTime=Mon Oct 16 14:00:57 EDT 2017}} request-origin=127.0.0.1, session-user=level1, session-project=UT3DrawTowerHmi, session-id=32964AC1
INFO   | jvm 1    | 2017/10/16 14:00:57 | W [a.Manager                     ] [18:00:57]: An alarm could not be acknowledged. It may no longer be registered. Event details: a6490b29-3073-4592-949d-adde96074996 / {{ackUser=usr-prov:default:/usr:level1, eventTime=Mon Oct 16 14:00:57 EDT 2017}} request-origin=127.0.0.1, session-user=level1, session-project=UT3DrawTowerHmi, session-id=32964AC1
INFO   | jvm 1    | 2017/10/16 14:00:57 | W [a.Manager                     ] [18:00:57]: An alarm could not be acknowledged. It may no longer be registered. Event details: a3935c2e-9dd6-4469-9522-16c6a88a7691 / {{ackUser=usr-prov:default:/usr:level1, eventTime=Mon Oct 16 14:00:57 EDT 2017}} request-origin=127.0.0.1, session-user=level1, session-project=UT3DrawTowerHmi, session-id=32964AC1
INFO   | jvm 1    | 2017/10/16 14:00:57 | W [a.Manager                     ] [18:00:57]: An alarm could not be acknowledged. It may no longer be registered. Event details: b7b760c2-9839-43f8-9d73-4ddac33ec9d9 / {{ackUser=usr-prov:default:/usr:level1, eventTime=Mon Oct 16 14:00:57 EDT 2017}} request-origin=127.0.0.1, session-user=level1, session-project=UT3DrawTowerHmi, session-id=32964AC1
INFO   | jvm 1    | 2017/10/16 14:00:57 | W [a.Manager                     ] [18:00:57]: An alarm could not be acknowledged. It may no longer be registered. Event details: a6490b29-3073-4592-949d-adde96074996 / {{ackUser=usr-prov:default:/usr:level1, eventTime=Mon Oct 16 14:00:57 EDT 2017}} request-origin=127.0.0.1, session-user=level1, session-project=UT3DrawTowerHmi, session-id=32964AC1
INFO   | jvm 1    | 2017/10/16 14:00:57 | W [a.Manager                     ] [18:00:57]: An alarm could not be acknowledged. It may no longer be registered. Event details: a3935c2e-9dd6-4469-9522-16c6a88a7691 / {{ackUser=usr-prov:default:/usr:level1, eventTime=Mon Oct 16 14:00:57 EDT 2017}} request-origin=127.0.0.1, session-user=level1, session-project=UT3DrawTowerHmi, session-id=32964AC1
INFO   | jvm 1    | 2017/10/16 14:00:57 | W [a.Manager                     ] [18:00:57]: An alarm could not be acknowledged. It may no longer be registered. Event details: b7b760c2-9839-43f8-9d73-4ddac33ec9d9 / {{ackUser=usr-prov:default:/usr:level1, eventTime=Mon Oct 16 14:00:57 EDT 2017}} request-origin=127.0.0.1, session-user=level1, session-project=UT3DrawTowerHmi, session-id=32964AC1
INFO   | jvm 1    | 2017/10/16 14:00:57 | W [a.Manager                     ] [18:00:57]: An alarm could not be acknowledged. It may no longer be registered. Event details: a6490b29-3073-4592-949d-adde96074996 / {{ackUser=usr-prov:default:/usr:level1, eventTime=Mon Oct 16 14:00:57 EDT 2017}} request-origin=127.0.0.1, session-user=level1, session-project=UT3DrawTowerHmi, session-id=32964AC1
INFO   | jvm 1    | 2017/10/16 14:00:57 | W [a.Manager                     ] [18:00:57]: An alarm could not be acknowledged. It may no longer be registered. Event details: a3935c2e-9dd6-4469-9522-16c6a88a7691 / {{ackUser=usr-prov:default:/usr:level1, eventTime=Mon Oct 16 14:00:57 EDT 2017}} request-origin=127.0.0.1, session-user=level1, session-project=UT3DrawTowerHmi, session-id=32964AC1

We are using the following script behind a button to acknowledge a collection of alarms.

# Get a list of all cleared, unacknowledged alarms 
lstClearUnacked = system.alarm.queryStatus(state=["ClearUnacked"])  

if (len(lstClearUnacked) > 0): 	
   # Extract the alarm ID's from all items in the list. 	
   lstAlarmId = [] 	
    for iIndex in range(len(lstClearUnacked)): 	
	    lstAlarmId.append(str(lstClearUnacked[iIndex].getId()))
#end for 	 	

    # Acknowledge all of these alarms (leave the notes field blank). 	
    for iIndex in range(len(lstAlarmId)): 	
	    system.alarm.acknowledge(lstAlarmId, "") 	

#end for #end if

We would like to get rid of these Alarm messages and prevent the client HMI from freezing when a large number of alarms are acknowledged with the above script.

Run the script in the background. That is what system.util.invokeAsynchronous() is for. Scripts that run in the foreground should always be designed to run in a limited time, preferably less than 1/10 of a second. You might find the functions in later.py helpful, as described in this thread.

I imported the later.py functions into my project and used the callAsync function to call the script from a button. It seems to work with a few alarms.

Thanks