# Clearing outstanding Queries

**URL:** <https://forum.inductiveautomation.com/t/clearing-outstanding-queries/6198>\
**Category:** General Discussion\
**Created:** [April 10, 2013, 2:01pm UTC](https://forum.inductiveautomation.com/t/clearing-outstanding-queries/6198 "2013-04-10T14:01:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ceidson](https://avatars.discourse-cdn.com/v4/letter/c/9d8465/32.png) [@ceidson](https://forum.inductiveautomation.com/u/ceidson)\
**Post date:** [April 10, 2013, 2:01pm UTC](https://forum.inductiveautomation.com/t/clearing-outstanding-queries/6198/1 "2013-04-10T14:01:30Z")

</div>

Yesterday I had a poorly written query that was causing a lot of trouble on a system. There were three instances of the query that had been running for nearly 3 hours. Is there a way to see that something like this is occurring so that the system may be fixed before it bogs down the whole system? Is there a way cancel these instances other than restarting the gateway?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [April 10, 2013, 3:26pm UTC](https://forum.inductiveautomation.com/t/clearing-outstanding-queries/6198/2 "2013-04-10T15:26:55Z")

</div>

You have view any running queries from the status page of the gateway. It will allow you to see if you have any queries running for a long time. The only way to cancel those queries is either to restart the gateway or edit the database connection and just press OK.

---

<div class="post-metadata">

**Author:** ![ceidson](https://avatars.discourse-cdn.com/v4/letter/c/9d8465/32.png) [@ceidson](https://forum.inductiveautomation.com/u/ceidson)\
**Post date:** [April 10, 2013, 3:35pm UTC](https://forum.inductiveautomation.com/t/clearing-outstanding-queries/6198/3 "2013-04-10T15:35:17Z")

</div>

So if I am not watching this page, there is no way to alert someone that something is going on. Is that correct?

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [April 10, 2013, 3:41pm UTC](https://forum.inductiveautomation.com/t/clearing-outstanding-queries/6198/4 "2013-04-10T15:41:45Z")

</div>

Actually there are system tags you can put alerts on. We have:

[System]Gateway/Database/CustomerCare/ActiveConnections  
[System]Gateway/Database/CustomerCare/ConnectionSaturation

that give you information on how many connections are taken up in the pool. You can alert when the saturation is higher than .90 (90%).

---

<div class="post-metadata">

**Author:** ![ceidson](https://avatars.discourse-cdn.com/v4/letter/c/9d8465/32.png) [@ceidson](https://forum.inductiveautomation.com/u/ceidson)\
**Post date:** [April 10, 2013, 3:46pm UTC](https://forum.inductiveautomation.com/t/clearing-outstanding-queries/6198/5 "2013-04-10T15:46:16Z")

</div>

Will do. Thank you very much.

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [April 10, 2013, 4:07pm UTC](https://forum.inductiveautomation.com/t/clearing-outstanding-queries/6198/6 "2013-04-10T16:07:10Z")

</div>

What version was that included in? Just thinkin’ I’m getting further behind the times… 😢

---

<div class="post-metadata">

**Author:** ![Travis.Cox](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Travis.Cox](https://forum.inductiveautomation.com/u/Travis.Cox)\
**Post date:** [April 10, 2013, 4:25pm UTC](https://forum.inductiveautomation.com/t/clearing-outstanding-queries/6198/7 "2013-04-10T16:25:17Z")

</div>

It looks like they were added in version 7.3.0.
