Troubleshooting
Fix historian silent data gaps with a registry value
Short answer
The data is stored; the retrieval view of it is stale. On the Historian server, create the DWORD32 value UseFileCacheForRetrieval set to 0 under HKLM\SOFTWARE\ArchestrA\Historian\Programs\aahStorage, then refresh the trend, with no reboot required. Confirm the fix by loading a previously blank window before running any manual query.
On this page
The data is not lost, and the fix is one registry value. When a trend shows hours of blank values with no Bad-quality markers, live HMI values keep updating, and a manual query run with wwRetrievalMode = 'Full' makes the window fill in, the values are already in the history blocks and the retrieval path served a stale view of them. On the Historian server, create the DWORD32 value UseFileCacheForRetrieval set to 0 under HKEY_LOCAL_MACHINE\SOFTWARE\ArchestrA\Historian\Programs\aahStorage and refresh the trend; no reboot is required. The pattern is reported on AVEVA System Platform and Historian 2023 R2 SP1 Patch 4 and P01, and on Windows 11 with the same service pack, and the vendor's knowledge base entry 000041658 gives the same change, described by support as a workaround with no root cause documented.
Separate a retrieval gap from real data loss #
Read the trend at the gap boundaries before touching anything. A source disconnect normally leaves Bad-quality (0) samples behind; a window that is simply empty, with Good-quality values on both edges, means the client received no rows for that range, which does not prove the rows were never stored. Live NMX traffic and HMI screens updating through the gap narrow it further, and a gap of hours is far too long to be a short in-memory buffer fragment showing through.
| Observation | What it tells you | Next check |
|---|---|---|
| No Bad-quality (0) samples inside the gap | Not a tag-level source or I/O failure | SMC logs on both nodes |
| HMI and supervisory screens keep updating | The live data path is healthy | Query the gap window |
| Good quality on both edges, window spans hours | Not a buffer fragment | Query the gap window |
A query with wwRetrievalMode = 'Full' returns the rows |
Data is stored; the retrieval view was stale | Apply the registry value |
The decisive observation is the last row: data that was truly never delivered cannot be recovered by a read. If the query fills the window and the trend then draws a complete curve, the storage path held the values all along. Blank trends do have other retrieval-side causes, so confirm which fault you have first — an edge trend emptied by a doubled SELECT looks identical to the operator.
Rule out the acquisition path first #
Open the SMC Log Viewer on both the AppEngine node and the Historian node and filter to the start and end times of a known gap. Look for three things: aahIDAS disconnect or reconnect entries, network failure entries, and Store and Forward activation on the AOS. In the reported case all three are absent on both servers, with no errors or warnings at either edge of the gap.
Silent logs at both edges mean aahIDAS never lost its connection, so Store and Forward never engaged. A genuine outage heals differently: data queues at the source and replays afterward, leaving entries behind, which is the sequence you see in how store-and-forward backfill behaves after a connection outage — and it never depends on a client-side read to appear.
Decisions at this check:
- Logs show disconnects or Store and Forward activity: you have an acquisition problem. Fix the connectivity or IDAS issue first; the registry change below does not apply.
- Logs silent on both nodes and the query fills the gap: the fault is in the retrieval subsystem. Go to the registry procedure.
- The client cannot reach the server at all: that is a different fault, and a trend client that fails to connect has its own checks.
Apply the registry value #
The documented procedure in the vendor technote stops the Historian before the edit. Field reports show the value also takes effect on a trend refresh with the service running, and no Windows reboot is involved either way. Export the aahStorage key before editing so you can restore it with one import.
- On the Historian server — the machine running
aahStorage, not a trend client — open Registry Editor and navigate toHKEY_LOCAL_MACHINE\SOFTWARE\ArchestrA\Historian\Programs\aahStorage. Export the key. - Create a DWORD32 value named
UseFileCacheForRetrievaland set it to 0. - Refresh the trend and re-check the gap window.
- If the gap persists, close and reopen the trend client and retest. If it still persists, restart the Historian in a maintenance window and retest the same window.
Scripted equivalent, with the check that proves the setting landed:
$key = 'HKLM:\SOFTWARE\ArchestrA\Historian\Programs\aahStorage' # string: registry key path
Test-Path $key # must return True
New-ItemProperty -Path $key -Name UseFileCacheForRetrieval -PropertyType DWord -Value 0 -Force
Get-ItemProperty -Path $key -Name UseFileCacheForRetrieval # output lists UseFileCacheForRetrieval : 0
One installation reported the trends recovering only after a restart rather than on the first refresh; whether the restart was required or the value had not been read yet is unresolved, which is why step 4 escalates in that order.
What disabling the retrieval file cache costs #
The file cache is enabled by default, so setting the value to 0 is a real configuration change, not a no-op. Where the history files sit on a local drive, Windows already provides a system-wide disk cache, and retrieval performance should not drop dramatically unless other processes are doing heavy disk I/O at the same time. Before you change anything, time one long-span, multi-tag trend load and write the number down; rerun the same load afterward and compare. Cache behavior surfacing as a query problem is not unique to this platform — store-and-forward cache query performance degradation in another platform is chased the same way, by timing retrieval with and without the cache in the path.
Working the 03:00 to 06:00 gap on 2023 R2 SP1 Patch 4 #
Inputs, each with its source:
- Gap window: 03:00 to 06:00 local time, from the reported symptom on the affected system.
- Bad-quality (0) samples inside the window: 0, from the trend display and logs.
- aahIDAS disconnect entries, network failure entries, and Store and Forward activations on both nodes at the window edges: 0 of each.
- Live HMI values during the window: updating normally.
- Query over the window with
wwRetrievalMode = 'Full': returns the complete curve.
Rule in words: a window that a read can fill is stored data behind a stale retrieval view; a window that a read cannot fill was never written. Only the first kind responds to the registry change.
The arithmetic:
- 06:00 - 03:00 = 3 h
- 3 h × 60 min/h = 180 min of blank trend
- 180 min holding 0 Bad-quality markers and 0 log events at the edges
Result: the full-retrieval query returns rows across all 180 min, and the trend then draws the whole window. A read cannot manufacture 180 minutes of values that were never stored, so the values were in the history blocks the entire time.
Decision: rows returned across the full window means a retrieval-side gap, so set UseFileCacheForRetrieval to 0 and verify as below. Threshold: if the query had returned no rows for any part of those 180 min, the registry change would not apply — inspect the history block storage configured for that time range in the System Management Console and take the log extracts to the vendor instead.
Where this is reported, and what that rules out #
- AVEVA System Platform and Historian 2023 R2 SP1 Patch 4, Windows Server 2022, with the AppEngine and Historian hosted as VMs on one ESXi host communicating over an internal vSwitch.
- 2023 R2 SP1 P01, confirmed separately.
- The same service pack on a Windows 11 system, with data sourced from Application Server objects.
- The vendor's knowledge base entry 000041658, tagged Historian 2023 P02, prescribing the same registry value.
The VM layout cannot be the trigger: with both servers on one host and no physical network between them, a physical network fault has nowhere to happen, and the silent aahIDAS logs agree. The Windows 11 occurrence, which is not virtualized, shows the same gap, which rules the layout out twice. Version does not clear it either — Patch 4 is several releases after the technote's 2023 P02 tag and still shows the symptom. No fixed build is documented, so apply the value now rather than deferring in the hope that a patch already covers it.
Verify the fix and keep watching #
- Load a window that was blank before the change — the 03:00 to 06:00 stretch of an affected day — before running any manual query. The full curve must draw on the first load; if it appears only after a Query run, the fix has not taken effect.
- The gaps recur at random intervals, so one clean refresh proves little. Watch several days and check the first naturally occurring gap the same way.
- After any Historian upgrade or patch, confirm the value is still present in the key before assuming it carried over.
- If a gap returns with the value in place, collect the SMC logs from both nodes at the gap edges and open a support case: that is new evidence against the workaround, not a reason to keep toggling the registry.
Questions asked
Is a restart needed for UseFileCacheForRetrieval to take effect?
No Windows reboot is needed; set the value and refresh the trend. Reports differ on how fast it lands: one site recovered on the refresh, another only after a restart, which may mean the value had simply not been read yet. Escalate in order: refresh the trend, close and reopen the client, then restart the Historian in a maintenance window, and retest the same gap window after each step.
How do I undo the change if retrieval slows down?
Delete UseFileCacheForRetrieval from the aahStorage key. The default is the value's absence, so removing it puts the file cache back into the retrieval path. If you timed a long-span, multi-tag trend load before the change, rerun that same load after deleting and confirm you are back at your baseline number before leaving it deleted.
Do I set this on the trend client or on the Historian server?
On the Historian server, the machine where aahStorage and the history blocks live. The trend clients and the Query application are readers of that storage, and the value changes what the storage program serves them, so edit the server. The full key path is HKEY_LOCAL_MACHINE\SOFTWARE\ArchestrA\Historian\Programs\aahStorage.
Does turning the cache off affect how data is written?
No. The value removes a cache from the retrieval path only; the write path to the history blocks is untouched. The symptom itself is the evidence: live values kept updating through the gap and the full window reappeared on a read, so storing the data was never the problem, serving it was.
Is this fixed in a newer Historian release?
No fixed build is documented. The symptom appears on 2023 R2 SP1 P01 and Patch 4, several releases after the technote's Historian 2023 P02 tag, and on a Windows 11 system with the same service pack. The vendor's support describes the registry change as a workaround and has not published a root cause, so apply it now and re-check the value after any upgrade.