# Ignition Memory increasing after Scripting Restart

**URL:** <https://forum.inductiveautomation.com/t/ignition-memory-increasing-after-scripting-restart/66799>\
**Category:** Ignition\
**Created:** [November 22, 2022, 10:38am UTC](https://forum.inductiveautomation.com/t/ignition-memory-increasing-after-scripting-restart/66799 "2022-11-22T10:38:47Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [December 2, 2022, 10:18am UTC](https://forum.inductiveautomation.com/t/ignition-memory-increasing-after-scripting-restart/66799/11 "2022-12-02T10:18:33Z")

</div>

It isn’t safe to kill threads. Threads can and should be designed to be interruptible (checking for interrupt status and/or exceptions for graceful exit). If you didn’t do that, interrupt() may not work. If not, you will have to restart the gateway.

Start here:

> [@Managing multiple asynchronous threads](https://forum.inductiveautomation.com/t/managing-multiple-asynchronous-threads/37185):
>
> I've followed this post for monitoring a directory for file changes and I think I have created more than one watch service in different threads. How do I monitor, manage, and delete these threads?

Some other search results:

[https://forum.inductiveautomation.com/search?q=kill%20invokeAsynchronous](https://forum.inductiveautomation.com/search?q=kill%20invokeAsynchronous)

[https://forum.inductiveautomation.com/search?q=persistent%20thread%20leak](https://forum.inductiveautomation.com/search?q=persistent%20thread%20leak)

---

_[View the full topic](https://forum.inductiveautomation.com/t/ignition-memory-increasing-after-scripting-restart/66799)._
