# \[IGN-17775\] tag history query starting at exactly 1970-01-01 never finishes

**URL:** <https://forum.inductiveautomation.com/t/ign-17775-tag-history-query-starting-at-exactly-1970-01-01-never-finishes/117361>\
**Category:** Ignition Early Access\
**Tags:** perspective\
**Created:** [October 7, 2026, 2:25am UTC](https://forum.inductiveautomation.com/t/ign-17775-tag-history-query-starting-at-exactly-1970-01-01-never-finishes/117361 "2026-10-07T02:25:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexraymond](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alexraymond/32/16951_2.png) [@alexraymond](https://forum.inductiveautomation.com/u/alexraymond)\
**Post date:** [October 7, 2026, 2:25am UTC](https://forum.inductiveautomation.com/t/ign-17775-tag-history-query-starting-at-exactly-1970-01-01-never-finishes/117361/1 "2026-10-07T02:25:58Z")

</div>

Sharing a possible bug we found on 8.3.9 with the Core Historian, in case it's useful to others.

An averaged `system.tag.queryTagHistory` whose `startDate` is exactly the epoch (`Date(0)`) doesn't return when there's stored data in the range. The gateway thread keeps running at 100% of one core until the gateway restarts. The same query starting 1 ms later returns right away.

Reproduction in the Script Console (the `Date(0)` query leaves a running thread until restart):

```python
from java.util import Date
path = '[default]Your/Historized/Tag'
now = system.date.now()
for start in (Date(1), Date(0)):
	ds = system.tag.queryTagHistory(paths=[path], startDate=start, endDate=now, returnSize=300,
									aggregationMode='Average', returnFormat='Wide', timeout=15000)
	print start.getTime(), ds.getRowCount()

```

`Date(1)` returns immediately. `Date(0)` times out with "Gateway Error 500", and gateway CPU stays one core higher afterwards.

We found it through a Perspective binding that polled every 5 s and took its start date from a DateTime tag that reads 1970-01-01 (Good\_Initial) until it's set. Each poll left another running thread. After about 30 minutes there were 290 of them and all 24 cores were busy. `timeout=` didn't limit it, since it isn't used in gateway scope.

Each thread was in:

```python
CalculatingResultNode.finishAggregationWindow(CalculatingResultNode.java:133)
CalculatingResultNode.processValue(CalculatingResultNode.java:214)
HistorianDataColumn.processValue(HistorianDataColumn.java:122)

```

From the bytecode, `finishAggregationWindow` appears to treat `currentBlock == 0` as "no window yet". With a query start of 0, the window doesn't advance, so the `while (currentBlock < blockId)` loop in `processValue` doesn't end.

Avoiding a start date of exactly the epoch prevents it.

---

<div class="post-metadata">

**Author:** ![David\_Stone](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/david_stone/32/79749_2.png) [@David\_Stone](https://forum.inductiveautomation.com/u/David_Stone)\
**Post date:** [October 7, 2026, 5:26am UTC](https://forum.inductiveautomation.com/t/ign-17775-tag-history-query-starting-at-exactly-1970-01-01-never-finishes/117361/2 "2026-10-07T05:26:31Z")

</div>

Evidently if you had a Modicon 084 still in service, this might be a significant problem with real history values...

---

<div class="post-metadata">

**Author:** ![avaughn](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/avaughn/32/38972_2.png) [@avaughn](https://forum.inductiveautomation.com/u/avaughn)\
**Post date:** [October 7, 2026, 2:19pm UTC](https://forum.inductiveautomation.com/t/ign-17775-tag-history-query-starting-at-exactly-1970-01-01-never-finishes/117361/3 "2026-10-07T14:19:26Z")

</div>

Looks like this issue was reported through support recently, so we do have an existing ticket to get it addressed.

Edit: I linked this report to the ticket and added the ticket number to the title.
