# Easy chart database fault

**URL:** <https://forum.inductiveautomation.com/t/easy-chart-database-fault/53432>\
**Category:** Ignition\
**Created:** [November 24, 2021, 3:11pm UTC](https://forum.inductiveautomation.com/t/easy-chart-database-fault/53432 "2021-11-24T15:11:58Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wladimir\_Celedon](https://avatars.discourse-cdn.com/v4/letter/w/9e8a1a/32.png) [@Wladimir\_Celedon](https://forum.inductiveautomation.com/u/Wladimir_Celedon)\
**Post date:** [November 24, 2021, 3:11pm UTC](https://forum.inductiveautomation.com/t/easy-chart-database-fault/53432/1 "2021-11-24T15:11:58Z")

</div>

Hi.

I’m using Ignition 7.8.5 with MySQL 5.6 and the MySQL Connector Java 5.1.23. When I tried to watch a trend, the easy chart get a fault and the worst case was gateway restarted. I checked the log and found this:

INFO | jvm 2 | 2021/11/24 11:03:38 | ERROR [QueryResultWriter] [11:03:38,323]: Error executing historical tag read.  
INFO | jvm 2 | 2021/11/24 11:03:38 | com.inductiveautomation.ignition.gateway.datasource.FaultedDatabaseConnectionException: The database connection ‘db\_energia\_hist’ is FAULTED. See Gateway Status for details.  
INFO | jvm 2 | 2021/11/24 11:03:38 | at com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl.getConnectionImpl(DatasourceManagerImpl.java:173)  
INFO | jvm 2 | 2021/11/24 11:03:38 | at com.inductiveautomation.ignition.gateway.datasource.DatasourceImpl.getConnection(DatasourceImpl.java:194)  
INFO | jvm 2 | 2021/11/24 11:03:38 | at com.inductiveautomation.ignition.gateway.datasource.DatasourceManagerImpl.getConnection(DatasourceManagerImpl.java:116)  
INFO | jvm 2 | 2021/11/24 11:03:38 | at com.inductiveautomation.gateway.tags.history.processing.GatewayContextConnectionProvider.getConnection(GatewayContextConnectionProvider.java:31)  
INFO | jvm 2 | 2021/11/24 11:03:38 | at com.inductiveautomation.gateway.tags.history.processing.GatewayContextConnectionProvider.getConnection(GatewayContextConnectionProvider.java:10)

The query in easy chart works, because I see the data. But the easy chart is holding in “loading” and after minutes gets the fault (database without connection). So I write a script in python to get the data from historical database and the result is more than 1804754 records.

Is there any suggestion to configure in easychart?

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [November 24, 2021, 3:57pm UTC](https://forum.inductiveautomation.com/t/easy-chart-database-fault/53432/2 "2021-11-24T15:57:24Z")

</div>

check your database connection, this doesnt look like it has anything to do with the chart itself

---

<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:** [November 24, 2021, 4:52pm UTC](https://forum.inductiveautomation.com/t/easy-chart-database-fault/53432/3 "2021-11-24T16:52:49Z")

</div>

> [@Wladimir\_Celedon](#):
>
> com.inductiveautomation.ignition.gateway.datasource.FaultedDatabaseConnectionException: The database connection ‘db\_energia\_hist’ is FAULTED. See Gateway Status for details.

As the error says: check the status of your DB on the gateway to get the actual info for why the DB connection was faulted (apparently temporarily?)

---

<div class="post-metadata">

**Author:** ![Wladimir\_Celedon](https://avatars.discourse-cdn.com/v4/letter/w/9e8a1a/32.png) [@Wladimir\_Celedon](https://forum.inductiveautomation.com/u/Wladimir_Celedon)\
**Post date:** [November 24, 2021, 5:33pm UTC](https://forum.inductiveautomation.com/t/easy-chart-database-fault/53432/4 "2021-11-24T17:33:20Z")

</div>

I did not watch the status in that moment. I’m going to check the status when it happens again.

But I cann’t understand why in easy chart goes down the ignition, but with system.tag.queryTagHistory I got the information. I configured tagHistoryResolution to Chart Width in the easy chart.

---

<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:** [November 24, 2021, 6:10pm UTC](https://forum.inductiveautomation.com/t/easy-chart-database-fault/53432/5 "2021-11-24T18:10:49Z")

</div>

You’re using an old (and unsupported) version - it’s possible it’s just a bug. It’s also possible there’s something different about the two queries in a way that’s non-obvious. It’s also possible that tag history is a red herring and your DB is just failing for some reason, and only the automatically recurring queries from the easy chart happen to hit it.

---

<div class="post-metadata">

**Author:** ![Wladimir\_Celedon](https://avatars.discourse-cdn.com/v4/letter/w/9e8a1a/32.png) [@Wladimir\_Celedon](https://forum.inductiveautomation.com/u/Wladimir_Celedon)\
**Post date:** [November 25, 2021, 1:08pm UTC](https://forum.inductiveautomation.com/t/easy-chart-database-fault/53432/6 "2021-11-25T13:08:09Z")

</div>

Ok. When that happens, I noticed that the CPU goes up to 90% and do not decrease.  
Is there a way to check the threads in Ignition and how to stop? Because, in the log is not clear which thing cause the increment in CPU, I always watch the warning ClockDriftDetector.

---

<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:** [November 29, 2021, 3:52pm UTC](https://forum.inductiveautomation.com/t/easy-chart-database-fault/53432/7 "2021-11-29T15:52:41Z")

</div>

Yes, there should be a section in the gateway configuration where you can get a view of the live threads on the gateway (or you can use the gateway control utility to get a thread dump).
