system.tag.queryTagHistory timeout not adjustable over 60 seconds

I am using system.tag.queryTagHistory() to query an OPC-HDA provider.

Everything is working fine, but when the dataset gets to big, the function times out, which is OK.

I have included the argument timeout like this:

system.tag.queryTagHistory(arg1=arg1,arg2=arg2, timeout=70000)

If is set timeout to 10000 msec, it will timeout at 10s. My problem is that i cannot change the timeout higher than 60000.( It will still timeout at 60s if I set 100s.)

Further, I have set the project property client timeout to 100, saved and re-launched the client. Still no timeout higher than 60s. (see picture below).

image

Im currently using 8.06, and is pulling the history through a remote history provider (gateway network).
Any ideas anyone?

Any possibility your DB is imposing its own timeout?

Not sure @pturmel, It looks like the timeout comes from the ignition connector based on the message below…

Further, The query size is only at 32000 records, and normally we are limited to 150k from other systems. To begin with, we can atleast state that the Ignition driver is a bit slow.

com.inductiveautomation.metro.api.ex.TimeoutExpiredException: TimeoutExpiredException[queueId=service_TagHistoryService, targetIntent=_services.invoke_|2, msgData=com.inductiveautomation.ignition.gateway.sqltags.history.distributed.TagHistoryService#queryTagHistory([interface com.inductiveautomation.ignition.common.sqltags.history.TagHistoryQueryParams])]

at com.inductiveautomation.metro.impl.queues.StandardQueue.processTimeouts(StandardQueue.java:202)

at com.inductiveautomation.metro.impl.queues.StandardQueue.lambda$maybeScheduleTimeoutChecker$1(StandardQueue.java:184)

at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.base/java.util.concurrent.FutureTask.run(Unknown Source)

at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.base/java.lang.Thread.run(Unknown Source)

I have a feeling there is a bug in the client read timeout in Ignition 8. If I run queryTagHistory() from a reporting scheduled script, it might run for 5 minutes without timeout. So maybe there is something about the client / designer scope.

Hmm, looks like you’re querying against a remote provider, and the timeout is occurring at the gateway network service level…

Ugh, looks like gateway network service invocations are hardcoded at 60s timeout right now… :confused:

Oh… Thats to bad. Thanks for the reply anyways!
I will have to wait for the patch, and then for sepasoft OEE to release their stable build for that version :slightly_smiling_face:

@Kevin.Herron any updates on the hardcoded 60s?

Hi @Kevin.Herron, do you have any update about this topic?

1 Like

Nothing has changed, the ticket is in “incubation”…

If you want to contact a support rep and explain your setup and why this is a problem for you that will help. Reference IGN-3005 as the ticket number.

1 Like

I'm also getting this error, the 60 second timeout on a gateway network, this is pretty rough for us right now.

TimeoutExpiredException[queueId=service_TagHistoryService, targetIntent=_services.invoke_|2, msgData=com.inductiveautomation.ignition.gateway.sqltags.history.distributed.TagHistoryService#queryTagHistory([interface com.inductiveautomation.ignition.common.sqltags.history.TagHistoryQueryParams])]


I also wonder if there is truth to if it is running on client scope vs gateway scope. I'll report back.

One more thing that is very odd is if it times out it will throw an exception that will hault the entire script event if the system.tag.queryTagHistory() is in a try: except:

	for i in range(0,2):
		try:
        
  # The process will fail at the line directly below here in the try() statement. 
			res= system.tag.queryTagHistory(
				paths = tagPaths,
				startDate = startDate,
				endDate = endDate,
				returnSize = 1,
				aggregationMode = aggregationMode,
				columnNames = columnNames,
				timeout = 900000,
			)
			successFlag = True
			break
		
		except Exception as e:
			import time
			loggerName = "Trends.TagHistory.aggregateTags()"
			logger = system.util.getLogger(loggerName)
			
			logString = """
			%s Failed with an Exception of %s for tagPaths %s and startDate = %s endDate = %s and aggregation = %s
			"""%(loggerName,e,tagPaths,startDate,endDate,aggregationMode)
			print logString
			logger.info(logString)
			time.sleep(10)
1 Like

Any update on this? I just ran into the same limitation.

1 Like

Bump on getting this fixed!

1 Like