# Exception occurred during async write operation

**URL:** <https://forum.inductiveautomation.com/t/exception-occurred-during-async-write-operation/28801>\
**Category:** Ignition\
**Created:** [October 3, 2019, 6:59pm UTC](https://forum.inductiveautomation.com/t/exception-occurred-during-async-write-operation/28801 "2019-10-03T18:59:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aluster](https://avatars.discourse-cdn.com/v4/letter/a/5daacb/32.png) [@aluster](https://forum.inductiveautomation.com/u/aluster)\
**Post date:** [October 3, 2019, 6:59pm UTC](https://forum.inductiveautomation.com/t/exception-occurred-during-async-write-operation/28801/1 "2019-10-03T18:59:16Z")

</div>

Getting an error message stating “exception occurred during async write operation”  
Has anyone received this error or understand what is trying to speak to?

The detailed error message reads:

CompletionException: com.inductiveautomation.ignition.client.gateway\_interface.GatewayException: Read timed out  
Caused by: com.inductiveautomation.ignition.client.gateway\_interface.GatewayException: Read timed out  
Caused by: java.net.SocketTimeoutException: Read timed out

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 3, 2019, 7:08pm UTC](https://forum.inductiveautomation.com/t/exception-occurred-during-async-write-operation/28801/2 "2019-10-03T19:08:15Z")

</div>

The error message you’ve posted is just indicating the gateway didn’t return a response in time. Check the gateway’s log for an error message happening at the same time.

---

<div class="post-metadata">

**Author:** ![aluster](https://avatars.discourse-cdn.com/v4/letter/a/5daacb/32.png) [@aluster](https://forum.inductiveautomation.com/u/aluster)\
**Post date:** [October 4, 2019, 12:56pm UTC](https://forum.inductiveautomation.com/t/exception-occurred-during-async-write-operation/28801/3 "2019-10-04T12:56:08Z")

</div>

I’ve watched the log in the gateway and I don’t see an error happening at the same time. This problem started to occur when I changed my scripting of buttons writing to tags. I had previously had my Control Value of the button write to exampletag.value - This had been creating another error previously saying “error writing to tag.” I saw on another forum that by taking out the “.value” at the end of what tag I was writing to, could get rid of that error. Once I took away the “.value” I got rid of that error message, but that’s when I got this new error of “async write operation.” I’m seeing the machine I’m working on see the effects of this new error. I try to make some things move by pressing some buttons and nothing happens, but a minute later, that error message will pop up and then everything on the machine tries to move at the same time. I hope this helps describe what I’m experiencing.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 4, 2019, 3:20pm UTC](https://forum.inductiveautomation.com/t/exception-occurred-during-async-write-operation/28801/4 "2019-10-04T15:20:48Z")

</div>

Can you post your script? And the full ‘details’ of the error message?

What you’re describing sounds like a scripting action locking up the ‘Event Dispatch Thread’. Java Swing (the technology behind the Designer and Vision clients) is a single-threaded GUI - so anything that takes a large amount of time to run (ie, a blocking write to tag, if you’re running your script on the EDT) will prevent anything else _on the GUI_ from running in that time - including the act of repainting the GUI to move your components around, your mouse cursor, etc, etc.

There are a variety of ways to fix or mitigate that problem, but it’s hard to advise what’s best without seeing exactly what’s causing the problem.
