# Alarm Acknowledgement Speed

**URL:** <https://forum.inductiveautomation.com/t/alarm-acknowledgement-speed/39666>\
**Category:** Ignition\
**Created:** [October 14, 2020, 4:55pm UTC](https://forum.inductiveautomation.com/t/alarm-acknowledgement-speed/39666 "2020-10-14T16:55:32Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![dan.deason](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@dan.deason](https://forum.inductiveautomation.com/u/dan.deason)\
**Post date:** [October 14, 2020, 4:55pm UTC](https://forum.inductiveautomation.com/t/alarm-acknowledgement-speed/39666/1 "2020-10-14T16:55:32Z")

</div>

How long is it supposed to take to acknowledge alarms? If i get more than a few dozen and acknowledge them all at once it takes forever (over 30 seconds) and sometimes leads to a timeout.

I can’t imagine this is normal is it? Surely acknowledging even hundreds of alarms should be quick right?

Any insight or help would be appreciated.

The examples below are done in the script console, but the same thing happens if you use the alarm list to select all and then hit the acknowledge button.

This took roughly 30 seconds to complete the acknowledge:

```auto
>>> a = system.alarm.queryStatus(path=['*'], state=['ClearUnacked', 'ActiveUnacked'])
>>> b = [str(alarmevent.getId()) for alarmevent in a]
>>> len(b)
32
>>> system.alarm.acknowledge(b, '')

```

This timed out before completing:

```auto
>>> a = system.alarm.queryStatus(path=['*'], state=['ClearUnacked','ActiveUnacked'])
>>> b = [str(alarmEvent.getId()) for alarmEvent in a]
>>> len(b)
239
>>> system.alarm.acknowledge(b, '')
Java Traceback:
Traceback (most recent call last):
  File "<input>", line 1, in <module>
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:351)

	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:530)

	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:283)

	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:278)

	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.invoke(GatewayInterface.java:934)

	at com.inductiveautomation.factorypmi.application.script.builtin.ClientAlarmUtilities.acknowledge(ClientAlarmUtilities.java:76)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.base/java.lang.reflect.Method.invoke(Unknown Source)

com.inductiveautomation.ignition.client.gateway_interface.GatewayException: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Read timed out

	at org.python.core.Py.JavaError(Py.java:552)

	at org.python.core.Py.JavaError(Py.java:543)

	at org.python.core.PyReflectedFunction. __call__ (PyReflectedFunction.java:190)

	at com.inductiveautomation.ignition.common.script.ScriptManager$ReflectedInstanceFunction. __call__ (ScriptManager.java:524)

	at org.python.core.PyObject. __call__ (PyObject.java:497)

	at org.python.core.PyObject. __call__ (PyObject.java:501)

	at org.python.pycode._pyx66.f$0(<input>:1)

	at org.python.pycode._pyx66.call_function(<input>)

	at org.python.core.PyTableCode.call(PyTableCode.java:171)

	at org.python.core.PyCode.call(PyCode.java:18)

	at org.python.core.Py.runCode(Py.java:1614)

	at org.python.core.Py.exec(Py.java:1658)

	at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:276)

	at org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter.java:131)

	at com.inductiveautomation.ignition.designer.gui.tools.jythonconsole.JythonConsole$ConsoleWorker.doInBackground(JythonConsole.java:605)

	at com.inductiveautomation.ignition.designer.gui.tools.jythonconsole.JythonConsole$ConsoleWorker.doInBackground(JythonConsole.java:593)

	at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)

	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)

	at java.desktop/javax.swing.SwingWorker.run(Unknown Source)

	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

	at java.base/java.lang.Thread.run(Unknown Source)

Caused by: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Read timed out

	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:351)

	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:530)

	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:283)

	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:278)

	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.invoke(GatewayInterface.java:934)

	at com.inductiveautomation.factorypmi.application.script.builtin.ClientAlarmUtilities.acknowledge(ClientAlarmUtilities.java:76)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.base/java.lang.reflect.Method.invoke(Unknown Source)

	at org.python.core.PyReflectedFunction. __call__ (PyReflectedFunction.java:188)

	... 19 more

Caused by: java.net.SocketTimeoutException: Read timed out

	at java.base/java.net.SocketInputStream.socketRead0(Native Method)

	at java.base/java.net.SocketInputStream.socketRead(Unknown Source)

	at java.base/java.net.SocketInputStream.read(Unknown Source)

	at java.base/java.net.SocketInputStream.read(Unknown Source)

	at java.base/java.io.BufferedInputStream.fill(Unknown Source)

	at java.base/java.io.BufferedInputStream.read1(Unknown Source)

	at java.base/java.io.BufferedInputStream.read(Unknown Source)

	at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)

	at java.base/sun.net.www.http.HttpClient.parseHTTP(Unknown Source)

	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)

	at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)

	at java.base/java.net.HttpURLConnection.getResponseCode(Unknown Source)

	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:437)

	... 28 more

Traceback (most recent call last):
  File "<input>", line 1, in <module>
	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.newGatewayException(GatewayInterface.java:351)

	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.getResponse(GatewayInterface.java:530)

	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:283)

	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.sendMessage(GatewayInterface.java:278)

	at com.inductiveautomation.ignition.client.gateway_interface.GatewayInterface.invoke(GatewayInterface.java:934)

	at com.inductiveautomation.factorypmi.application.script.builtin.ClientAlarmUtilities.acknowledge(ClientAlarmUtilities.java:76)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

	at java.base/java.lang.reflect.Method.invoke(Unknown Source)

com.inductiveautomation.ignition.client.gateway_interface.GatewayException: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Read timed out

```

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 14, 2020, 4:57pm UTC](https://forum.inductiveautomation.com/t/alarm-acknowledgement-speed/39666/2 "2020-10-14T16:57:34Z")

</div>

Any chance you’re acknowledging alarms belonging to a remote provider?

---

<div class="post-metadata">

**Author:** ![dan.deason](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@dan.deason](https://forum.inductiveautomation.com/u/dan.deason)\
**Post date:** [October 14, 2020, 5:49pm UTC](https://forum.inductiveautomation.com/t/alarm-acknowledgement-speed/39666/3 "2020-10-14T17:49:19Z")

</div>

The alarms are on a different gateway, yes. When this system was set up a gatweway was set up for visualization, a gateway for the data tags, and a final gateway to run logic

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 14, 2020, 5:53pm UTC](https://forum.inductiveautomation.com/t/alarm-acknowledgement-speed/39666/4 "2020-10-14T17:53:09Z")

</div>

Well, unfortunately that’s just slow right now.

Side effect of the alarm system’s API having been designed long before remote gateways were really a thing. The scripting call takes a collection, but it funnels down to acknowledging one alarm at a time, even if that’s against a remote provider, which means one network call at a time.

It may happen to get a little faster in 8.1.0 because of some other GAN changes, but I’ll open a ticket to see if something can be done to speed this specifically up in the future.

---

<div class="post-metadata">

**Author:** ![dan.deason](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@dan.deason](https://forum.inductiveautomation.com/u/dan.deason)\
**Post date:** [October 14, 2020, 5:54pm UTC](https://forum.inductiveautomation.com/t/alarm-acknowledgement-speed/39666/5 "2020-10-14T17:54:57Z")

</div>

Thanks. Unfortunate indeed, but thanks for the quick reply.

---

<div class="post-metadata">

**Author:** ![dan.deason](https://avatars.discourse-cdn.com/v4/letter/d/a6a055/32.png) [@dan.deason](https://forum.inductiveautomation.com/u/dan.deason)\
**Post date:** [October 14, 2020, 7:44pm UTC](https://forum.inductiveautomation.com/t/alarm-acknowledgement-speed/39666/6 "2020-10-14T19:44:37Z")

</div>

As a workaround I added an “alarms” project to the gateway with the alarms and an “Ack\_Alarms” message handler. Now instead of calling `system.alarm.acknowledge` directly, I pass the parameters for the query status in the message payload and ack them on the local gateway. Works sufficiently fast - it takes a second for the round trip, but hundreds of alarms can ack in less than a couple seconds.

When the ack all button is pressed:

```auto
system.util.sendMessage('Alarms', 'Ack_Alarms', {'path':['*'], 'state':['ClearUnacked','ActiveUnacked']}, remoteServers=['TAG_SERVER1', 'TAG_SERVER2'])

```

On the message handler:

```auto
def handleMessage(payload):
	"""
	This message handler will be called each time a message of this
	type is received.

	Arguments:
		payload: A dictionary that holds the objects passed to this
		         message handler. Retrieve them with a subscript, e.g.
		         myObject = payload['argumentName']
	"""
	'''
	Payload Description:
	path = ['*']
	state = ['ClearUnacked','ActiveUnacked']
	'''
	logger = system.util.getLogger('Ack_Alarms')
	a = system.alarm.queryStatus(path=payload['path'], state=payload['state'])
	b = [str(alarmEvent.getId()) for alarmEvent in a]
	system.alarm.acknowledge(b, '', '')
	logger.info('Acked {} alarms'.format(len(b)))

```

---

<div class="post-metadata">

**Author:** ![FrankP](https://avatars.discourse-cdn.com/v4/letter/f/34f0e0/32.png) [@FrankP](https://forum.inductiveautomation.com/u/FrankP)\
**Post date:** [November 21, 2022, 4:17pm UTC](https://forum.inductiveautomation.com/t/alarm-acknowledgement-speed/39666/7 "2022-11-21T16:17:38Z")

</div>

Experiencing this with Ignition 8.1.21. Any news here? Thanks!

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 21, 2022, 4:23pm UTC](https://forum.inductiveautomation.com/t/alarm-acknowledgement-speed/39666/8 "2022-11-21T16:23:45Z")

</div>

Supposedly this was improved in 8.1.2. If you're still having an issue get in touch with support so they can take a look and maybe create a new issue. 8.1.2 should have added a bulk call at the gateway network layer and sped things up.

---

<div class="post-metadata">

**Author:** ![FrankP](https://avatars.discourse-cdn.com/v4/letter/f/34f0e0/32.png) [@FrankP](https://forum.inductiveautomation.com/u/FrankP)\
**Post date:** [November 21, 2022, 4:42pm UTC](https://forum.inductiveautomation.com/t/alarm-acknowledgement-speed/39666/9 "2022-11-21T16:42:44Z")

</div>

Thank you for the fast response! I have a followup before I make a ticket. For various historical reasons related to ignition 7.9 and some SSL problems, our spokes are using http on port 80 for the GAN connections (same as GW web interface). Would there be any potential performance improvements moving to port 8060? We're using remote tag providers and alarm history sync.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [November 21, 2022, 4:48pm UTC](https://forum.inductiveautomation.com/t/alarm-acknowledgement-speed/39666/10 "2022-11-21T16:48:29Z")

</div>

No, but if any of the gateways involved in the alarm acking are on 7.9 you don't get the performance gains.
