# Gateway messages lost when restarting scripts

**URL:** <https://forum.inductiveautomation.com/t/gateway-messages-lost-when-restarting-scripts/50466>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [August 31, 2021, 12:24pm UTC](https://forum.inductiveautomation.com/t/gateway-messages-lost-when-restarting-scripts/50466 "2021-08-31T12:24:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [August 31, 2021, 12:24pm UTC](https://forum.inductiveautomation.com/t/gateway-messages-lost-when-restarting-scripts/50466/1 "2021-08-31T12:24:56Z")

</div>

When the gateway script manager ist restarted, there seems to be a short period of time during which the message handler is not available.  
Is there a best practice to catch those events and resent the message?

```auto
INFO | jvm 1 | 2021/08/31 14:14:36 | E [S.M.DispatchManager] [12:14:35]: Gateway script MessageHandlerException, project 'xxx', message handler yyy': com.inductiveautomation.ignition.common.script.message.MessageHandlerException: MessageHandlerManager is null in ScriptConfig! 

```

Thanks in advance!

---

<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:** [August 31, 2021, 12:26pm UTC](https://forum.inductiveautomation.com/t/gateway-messages-lost-when-restarting-scripts/50466/2 "2021-08-31T12:26:43Z")

</div>

I think this is essentially the same issue reported [here](https://forum.inductiveautomation.com/t/bug-3893-message-handler-null-in-scriptconfig-during-project-save/49995), in which case we do have a ticket for this now. I don’t think there is a workaround.

---

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [August 31, 2021, 1:09pm UTC](https://forum.inductiveautomation.com/t/gateway-messages-lost-when-restarting-scripts/50466/3 "2021-08-31T13:09:15Z")

</div>

Thank you for the response. I haven’t seen that other post.
