# Taghistory query on Table cause server & client crash

**URL:** <https://forum.inductiveautomation.com/t/taghistory-query-on-table-cause-server-client-crash/22854>\
**Category:** Ignition\
**Created:** [February 25, 2019, 2:51pm UTC](https://forum.inductiveautomation.com/t/taghistory-query-on-table-cause-server-client-crash/22854 "2019-02-25T14:51:05Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [February 25, 2019, 2:51pm UTC](https://forum.inductiveautomation.com/t/taghistory-query-on-table-cause-server-client-crash/22854/1 "2019-02-25T14:51:05Z")

</div>

Hello

I create table and bind it to date range component. I use ignition Tag history. After some test and selecting different time range the client and server crash and I get following error:

> Blockquote  
> Traceback (most recent call last):  
> File "\<event:propertyChange\>", line 1, in \<module\>  
> com.inductiveautomation.ignition.client.gateway\_interface.GatewayException: com.inductiveautomation.ignition.client.gateway\_interface.GatewayException:  
> The database connection 'MySQL' is FAULTED.  
> See Gateway Status for details.  
> caused by GatewayException: The database connection 'MySQL' is FAULTED. See Gateway Status for details.  
> caused by FaultedDatabaseConnectionException: The database connection 'MySQL' is FAULTED. See Gateway Status for details.  
> Ignition v7.9.10 (b2018112821)  
> Java: Azul Systems, Inc. 9.0.7.2

This happen when I select range over 6 month and back to 1 month. I use 1 day as interval so the row count is not much more than 300 items.  
I check RAM usage I see the RAM grow up to 2400MB.  
Please guide me what cause this problem and how I can eliminate it.

---

<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:** [February 25, 2019, 6:17pm UTC](https://forum.inductiveautomation.com/t/taghistory-query-on-table-cause-server-client-crash/22854/2 "2019-02-25T18:17:19Z")

</div>

You are overloading your database. If you are running it on the same machine as your gateway, consider moving it to another machine. And giving it more resources. It is also possible, though unlikely, that your indices on the history tables are broken/missing/corrupted, and therefore your queries cannot be completed within the connection’s query time limit.

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [February 26, 2019, 3:35am UTC](https://forum.inductiveautomation.com/t/taghistory-query-on-table-cause-server-client-crash/22854/3 "2019-02-26T03:35:24Z")

</div>

Hi Phil  
Thanks for your help.  
I use i7 K series CPU with 16GB RAM.  
So for 8 columns query from database it should be enough.  
I also do same query in report module and get result without any problem very fast, so why table component show such behaviour?

How can I increase query time limit in ignition?

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [February 26, 2019, 12:48pm UTC](https://forum.inductiveautomation.com/t/taghistory-query-on-table-cause-server-client-crash/22854/4 "2019-02-26T12:48:43Z")

</div>

How is your polling mode and rate set up. Seems like I had a crash once when I accidently had the polling set to absolute and the rate at zero seconds.

---

<div class="post-metadata">

**Author:** ![grietveld](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/grietveld/32/6984_2.png) [@grietveld](https://forum.inductiveautomation.com/u/grietveld)\
**Post date:** [February 26, 2019, 1:06pm UTC](https://forum.inductiveautomation.com/t/taghistory-query-on-table-cause-server-client-crash/22854/5 "2019-02-26T13:06:32Z")

</div>

I would maybe check the default memory allocation for both the database and your ignition gateway. I haven’t had issues with it going all the way to faulting the database, but I have seen significant slowdowns sometimes.

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [February 26, 2019, 1:38pm UTC](https://forum.inductiveautomation.com/t/taghistory-query-on-table-cause-server-client-crash/22854/6 "2019-02-26T13:38:59Z")

</div>

This problem significantly decrease in v8.0 beta.  
when user select range more than a month I set sample size interval to a day to decrease return row count. for less than a month 1 hour and 30 min can be selected.

 ![Untitled](https://us1.discourse-cdn.com/inductiveautomation/original/2X/4/4d55368e1373b2009eecd2020b90a1054eea34a1.jpeg)

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [February 26, 2019, 3:54pm UTC](https://forum.inductiveautomation.com/t/taghistory-query-on-table-cause-server-client-crash/22854/7 "2019-02-26T15:54:12Z")

</div>

What is the InnoDBBufferPoolSize on your MYSQL?

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [February 26, 2019, 4:55pm UTC](https://forum.inductiveautomation.com/t/taghistory-query-on-table-cause-server-client-crash/22854/8 "2019-02-26T16:55:45Z")

</div>

Hi jpark  
I check my.ini and see inno\_buffer\_pool\_size=8M.  
If it’s helping I can update my gateway back up for you for see the problem yourself.

---

<div class="post-metadata">

**Author:** ![jpark](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jpark](https://forum.inductiveautomation.com/u/jpark)\
**Post date:** [February 26, 2019, 5:00pm UTC](https://forum.inductiveautomation.com/t/taghistory-query-on-table-cause-server-client-crash/22854/9 "2019-02-26T17:00:04Z")

</div>

You need to increase that. 8 megabytes is the default and not enough.

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [February 26, 2019, 5:18pm UTC](https://forum.inductiveautomation.com/t/taghistory-query-on-table-cause-server-client-crash/22854/10 "2019-02-26T17:18:23Z")

</div>

what is the best value for it?  
I have 8 GB RAM and set gateway to 2GB and client to 2GB limit.

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [February 26, 2019, 5:26pm UTC](https://forum.inductiveautomation.com/t/taghistory-query-on-table-cause-server-client-crash/22854/11 "2019-02-26T17:26:00Z")

</div>

Amazing. Thank you. It seems the problem solved when I increase it to 512M.  
Please tell me how should I set it properly for different usage.
