# Named Query hangs

**URL:** <https://forum.inductiveautomation.com/t/named-query-hangs/23439>\
**Category:** Ignition\
**Created:** [March 19, 2019, 2:11pm UTC](https://forum.inductiveautomation.com/t/named-query-hangs/23439 "2019-03-19T14:11:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim/32/3361_2.png) [@Tim](https://forum.inductiveautomation.com/u/Tim)\
**Post date:** [March 19, 2019, 2:11pm UTC](https://forum.inductiveautomation.com/t/named-query-hangs/23439/1 "2019-03-19T14:11:03Z")

</div>

I’m seeing named queries hanging in the gateway active query status screen when the client calling window is closed before the query results are returned. They will remain under the active query heading until manually cancelled.

Ignition 7.9.9  
SQL Server 12.0.5  
sqljdbc4  
Java 8.0.1620.12

---

<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:** [March 19, 2019, 4:09pm UTC](https://forum.inductiveautomation.com/t/named-query-hangs/23439/2 "2019-03-19T16:09:26Z")

</div>

The next time this happens, could you get a thread dump via Status -\> Diagnostics -\> Threads?

---

<div class="post-metadata">

**Author:** ![Kurt.Larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kurt.larson/32/6426_2.png) [@Kurt.Larson](https://forum.inductiveautomation.com/u/Kurt.Larson)\
**Post date:** [March 21, 2019, 2:30pm UTC](https://forum.inductiveautomation.com/t/named-query-hangs/23439/3 "2019-03-21T14:30:41Z")

</div>

Can you clarify what you mean by the “client calling window”?

It sounds like you have a window open in the client, which executes the named query, and then, when closing the window, the query itself still shows within active queries until cancelling. Does that sound right?

So far I’ve had no luck in reproducing this behavior repeating the above. Is the named query executing from script or some binding? (albeit shouldn’t make much difference)

---

<div class="post-metadata">

**Author:** ![Tim](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tim/32/3361_2.png) [@Tim](https://forum.inductiveautomation.com/u/Tim)\
**Post date:** [March 21, 2019, 2:50pm UTC](https://forum.inductiveautomation.com/t/named-query-hangs/23439/4 "2019-03-21T14:50:06Z")

</div>

Yes, your description is correct. It just runs from a named query binding on a custom dataset property. It’s a complex query and the results can take a few seconds to come back so it’s not too hard for a user to open and close the window before the results have returned.

I did send a thread dump to Paul via a direct message. I can try to capture another example with multiple stuck in this condition.

---

<div class="post-metadata">

**Author:** ![Kurt.Larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kurt.larson/32/6426_2.png) [@Kurt.Larson](https://forum.inductiveautomation.com/u/Kurt.Larson)\
**Post date:** [April 3, 2019, 11:02pm UTC](https://forum.inductiveautomation.com/t/named-query-hangs/23439/5 "2019-04-03T23:02:07Z")

</div>

Hi Tim, sorry for the delayed reply. Could you email [support@inductiveautomation.com](mailto:support@inductiveautomation.com) and reference this post? Also, if you can, please redo the test and attach the new thread dumps to the email. Thanks.
