# system.tag.queryTagHistory timeout not adjustable over 60 seconds

**URL:** <https://forum.inductiveautomation.com/t/system-tag-querytaghistory-timeout-not-adjustable-over-60-seconds/31465>\
**Category:** Ignition Early Access\
**Created:** [January 21, 2020, 1:54pm UTC](https://forum.inductiveautomation.com/t/system-tag-querytaghistory-timeout-not-adjustable-over-60-seconds/31465 "2020-01-21T13:54:04Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![tordvd](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tordvd/32/11525_2.png) [@tordvd](https://forum.inductiveautomation.com/u/tordvd)\
**Post date:** [January 21, 2020, 1:54pm UTC](https://forum.inductiveautomation.com/t/system-tag-querytaghistory-timeout-not-adjustable-over-60-seconds/31465/1 "2020-01-21T13:54:04Z")

</div>

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:

```auto
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](https://us1.discourse-cdn.com/inductiveautomation/original/2X/7/72ef698348ce00e6aaf0364261fd86b0af36e77a.png)

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

---

<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:** [January 21, 2020, 2:05pm UTC](https://forum.inductiveautomation.com/t/system-tag-querytaghistory-timeout-not-adjustable-over-60-seconds/31465/2 "2020-01-21T14:05:56Z")

</div>

Any possibility your DB is imposing its own timeout?

---

<div class="post-metadata">

**Author:** ![tordvd](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tordvd/32/11525_2.png) [@tordvd](https://forum.inductiveautomation.com/u/tordvd)\
**Post date:** [January 21, 2020, 2:31pm UTC](https://forum.inductiveautomation.com/t/system-tag-querytaghistory-timeout-not-adjustable-over-60-seconds/31465/3 "2020-01-21T14:31:49Z")

</div>

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.

```auto
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)

```

---

<div class="post-metadata">

**Author:** ![tordvd](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tordvd/32/11525_2.png) [@tordvd](https://forum.inductiveautomation.com/u/tordvd)\
**Post date:** [January 21, 2020, 2:34pm UTC](https://forum.inductiveautomation.com/t/system-tag-querytaghistory-timeout-not-adjustable-over-60-seconds/31465/4 "2020-01-21T14:34:15Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 21, 2020, 2:49pm UTC](https://forum.inductiveautomation.com/t/system-tag-querytaghistory-timeout-not-adjustable-over-60-seconds/31465/5 "2020-01-21T14:49:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 21, 2020, 2:57pm UTC](https://forum.inductiveautomation.com/t/system-tag-querytaghistory-timeout-not-adjustable-over-60-seconds/31465/6 "2020-01-21T14:57:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tordvd](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tordvd/32/11525_2.png) [@tordvd](https://forum.inductiveautomation.com/u/tordvd)\
**Post date:** [January 21, 2020, 3:00pm UTC](https://forum.inductiveautomation.com/t/system-tag-querytaghistory-timeout-not-adjustable-over-60-seconds/31465/7 "2020-01-21T15:00:00Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![tordvd](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tordvd/32/11525_2.png) [@tordvd](https://forum.inductiveautomation.com/u/tordvd)\
**Post date:** [December 17, 2021, 2:12pm UTC](https://forum.inductiveautomation.com/t/system-tag-querytaghistory-timeout-not-adjustable-over-60-seconds/31465/8 "2021-12-17T14:12:56Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![richard040693](https://avatars.discourse-cdn.com/v4/letter/r/7cd45c/32.png) [@richard040693](https://forum.inductiveautomation.com/u/richard040693)\
**Post date:** [June 16, 2022, 8:12pm UTC](https://forum.inductiveautomation.com/t/system-tag-querytaghistory-timeout-not-adjustable-over-60-seconds/31465/9 "2022-06-16T20:12:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [June 16, 2022, 8:33pm UTC](https://forum.inductiveautomation.com/t/system-tag-querytaghistory-timeout-not-adjustable-over-60-seconds/31465/10 "2022-06-16T20:33:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tmahaf](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tmahaf/32/23492_2.png) [@tmahaf](https://forum.inductiveautomation.com/u/tmahaf)\
**Post date:** [February 22, 2023, 3:51pm UTC](https://forum.inductiveautomation.com/t/system-tag-querytaghistory-timeout-not-adjustable-over-60-seconds/31465/11 "2023-02-22T15:51:28Z")

</div>

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

```auto
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:

```auto
	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)

```

---

<div class="post-metadata">

**Author:** ![brandon1](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@brandon1](https://forum.inductiveautomation.com/u/brandon1)\
**Post date:** [August 11, 2023, 5:19pm UTC](https://forum.inductiveautomation.com/t/system-tag-querytaghistory-timeout-not-adjustable-over-60-seconds/31465/12 "2023-08-11T17:19:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tmahaf](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/tmahaf/32/23492_2.png) [@tmahaf](https://forum.inductiveautomation.com/u/tmahaf)\
**Post date:** [October 17, 2024, 8:09pm UTC](https://forum.inductiveautomation.com/t/system-tag-querytaghistory-timeout-not-adjustable-over-60-seconds/31465/13 "2024-10-17T20:09:11Z")

</div>

Bump on getting this fixed!

---

<div class="post-metadata">

**Author:** ![apmalone1983](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@apmalone1983](https://forum.inductiveautomation.com/u/apmalone1983)\
**Post date:** [January 7, 2025, 1:37am UTC](https://forum.inductiveautomation.com/t/system-tag-querytaghistory-timeout-not-adjustable-over-60-seconds/31465/14 "2025-01-07T01:37:52Z")

</div>

Bumping this to see if there has been any movement on this topic.
