Long running queries timing out

Hi all,

I'm getting

com.inductiveAutomation.ignition.client.gateway_interface.GatewayException: com.inductiveautomation.ignition.client.gateway_interface.GatewayException: Read timed out

caused by GatewayException: Read timed out
caused by SocketTimeoutException: Read timed out

using Ingition v7.9.2 (b2017041315)
Java: Oracle Corp 1.8.1_141

using MySQL Server 2014 on a separate VM

In a client startup script I have system.util.setReadTimeout(600000). My polling base rate is 5000, connection timeout is 10000, read timeout is 600000

The timeout error occurs exactly 1 minute after firing the query. The query is not overly large, pulling about 6 days of 1 hour data for 2 tags, and it occasionally works.

Does anyone have any ideas about why this could be happening, or where I should check next to troubleshoot?

Thanks!

The query is not overly large, pulling about 6 days of 1 hour data for 2 tags, and it occasionally works.
How many rows are in the sqlth_te? How about in the most recent sqlt_data_X_date partition?

What's your aggregation mode, and return size (I'm guessing 1hr interval, but just want to confirm)?

The aggregation mode is average, we’re using startDate, lastDate and then using those to calculate a return size yielding exactly 1 hour data.

The size of the dataset is just one factor. Get a client app and try the query from that same computer. I’m guessing you have one already. If not, search for HeidiSQL, Navicat, DBTools, the free version is all you need for this. Most likely, you’ll get the same response time. If that’s the case, you’ll have to analyze the query in detail and find out why is taking too long. The lack of an index or the order of where clauses can cause huge differences in processing time.