Easy chart database fault


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?

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

1 Like

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?)

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.

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.

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.

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).