Troubleshooting
Fix AVEVA Historian overnight data gaps after restart
Short answer
Overnight trend gaps that fill after a restart are delayed snapshot merges, reported on AVEVA Historian 2023 P01 through P04, not lost data. Create the DWORD UseFileCacheForRetrieval, set it to 0 under HKEY_LOCAL_MACHINE\SOFTWARE\ArchestrA\Historian\Programs\aahStorage, restart the Historian server once, and the window stays populated.
On this page
The blank overnight hours are a retrieval fault, not a collection fault. On AVEVA Historian 2023 P01 through P04, snapshot merges can run hours or days behind, and until they finish the trend client retrieves nothing for that interval — the data is on disk the whole time, which is why a restart makes it visible. The documented correction is one registry value: under HKEY_LOCAL_MACHINE\SOFTWARE\ArchestrA\Historian\Programs\aahStorage, create the DWORD UseFileCacheForRetrieval, set it to 0, and restart the Historian server once. In the installation that reported this pattern, the first morning after the change retrieved normally.
A blank trend is a retrieval result #
A gap on the screen means the samples were not returned to that client, not that collection stopped. Historian separates acquisition from retrieval: the storage subsystem writes the samples, and data that the Classic Storage subsystem stores is served back through the AVEVA Historian Indexing Service (aahIndexSvc.exe). What a trend shows depends on that retrieval path as much as on what is on disk — the same ground covered in what actually decides historian data retrieval speed.
The reported mechanism is delayed snapshot merging: snapshots were not merged in time, and the data was not available for retrieval until the merge completed, which could take hours or days. The issue was seen on 2023 P01, and AVEVA support indicated it can also occur on 2023 P02 through P04. The workaround is documented in technical notes HistCl0329001, "Trend Client is Missing Data", and HistCl26032302, "Troubleshooting Missing Historical Data".
The fingerprint is the restart-recovery signature: a fixed overnight window blanks, the same samples reappear after the Historian server PC restarts, and the window blanks again the next night. A daily restart buys the data back at the price of one availability interruption per day; the registry value costs one restart, once, and ends the cycle.
Confirm the signature before the registry change #
Take these readings while the gap is present:
- Repeat the query for the exact tags over a fixed absolute window — 00:00 to 04:00 local in the reported case — so a moving trend window cannot hide or manufacture the missing period.
- Run the same tag and interval in a second Historian retrieval client, not only the InTouch trend. Both blank points at the server; only InTouch blank points at the display binding.
- Check acquisition status and historical quality on the affected tags against their live values. Healthy acquisition under a blank historical window is the merge-delay signature; an acquisition interruption is a different fault.
- Read the installed release and patch level from the server's product information and compare it against the reported patch range.
The decision from those readings: a fixed-interval blank that repopulates after a restart, with acquisition healthy, on a release inside that range — apply the registry fix. Leave controller communications and tag configuration alone for this signature.
The registry fix, step by step #
- Schedule a maintenance window; the required restart interrupts Historian availability.
- Back up the registry manually — export the
aahStoragekey — and record whetherUseFileCacheForRetrievalalready exists, with its type and data. - On the Historian server, run Registry Editor with administrative rights and navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\ArchestrA\Historian\Programs\aahStorage. - Create the DWORD (32-bit) value
UseFileCacheForRetrievaland set its data to 0. - Restart the Historian server PC in the approved window, confirm that Historian services and acquisition return, then re-run the fixed-window query from the list above.
The one caution that belongs here: export the key before editing and work inside the approved window, because both a mistyped value under HKLM and the restart that follows take the server away from production.
Worked example: closing a 00:00 to 04:00 gap on 2023 P01 #
Inputs, each with its source:
- Affected interval: 00:00 to 04:00 local time, noticed every morning — the reporting installation.
- Recovery evidence: the same samples appear after a Historian server PC restart — reported in the same case.
- Installed release: 2023 P01, inside the reported P01 through P04 range.
- Documented fix:
UseFileCacheForRetrievalset to 0 under theaahStoragekey, one restart.
Rule in words: blank hours per day equal the interval end minus the interval start; the restart burden while the fault stands is one restart per day; weekly blank exposure is the daily gap multiplied by seven days.
Arithmetic:
- Gap length: 04:00 - 00:00 = 4 h per day.
- Restart burden while unfixed: 1 restart/day × 7 days = 7 restarts per week, each one an availability interruption.
- Weekly blank exposure while unfixed: 4 h/day × 7 days = 28 h of trend visible only after a manual restart.
- Cost of the fix: 1 restart, once, then zero scheduled.
Result: leaving the fault alone costs 28 h of invisible trend and 7 interruptions per week; the registry change costs a single restart.
Decision and threshold: apply the DWORD fix rather than scheduling restarts, then verify on the next two mornings without touching the server. Both 00:00 to 04:00 windows populated confirms the fix — in the reporting installation, the first morning after the change retrieved normally. A still-blank window on either morning clears the merge path as the cause and moves the investigation to collection.
When the gap survives the fix #
If the fixed window is still blank after the change and two verification mornings, the merge delay is not the explanation. Work the collection side:
- Samples that never reached storage cannot be retrieved into existence; an acquisition outage leaves a real hole that no retrieval setting fills.
- When a single tag gaps while its neighbors stay healthy, trace that tag's historical configuration and acquisition source.
- Stops tied to platform edits follow a different path: why InTouch stops logging to Historian after WindowMaker edits covers one, and historian not logging after a re-enable in SMC covers another.
- A retrieval-side gap with a different cause is the subject of fixing historian silent data gaps with a registry value.
On a release outside the reported range with the exact same signature, apply the same reversible change first. If two mornings do not confirm it, restore the exported key and take the record — release number, fixed-window query results, and the technical note identifiers — to AVEVA support.
Questions asked
Does setting UseFileCacheForRetrieval to 0 delete or recollect any history?
No. The value only tells the aahStorage service whether to serve retrieval through its file cache; the history blocks on disk are untouched and nothing is recollected. The only interruption is the restart the change requires. Export the aahStorage key before editing so the original state can be restored exactly.
Which Historian releases show the delayed snapshot merge?
The behavior was reported on 2023 P01, and AVEVA support indicated it can occur on 2023 P02 through P04. Those are the documented bounds of the issue; the workaround appears in technical notes HistCl0329001 and HistCl26032302. On a release outside that range, the same reversible change is still the first thing to try when the restart-recovery signature matches.
Why does restarting the server bring the missing hours back?
Because the samples were stored all along. A restart puts the storage service back into a state where retrieval no longer waits behind the pending snapshot merges, so the interval becomes visible at once. That is also why the gap returns the next night: the restart clears the symptom, while the registry value removes the retrieval dependency on the lagging cache.
Is the midnight-to-4 AM window itself significant?
No. That interval is simply what the reporting installation observed. The mechanism is merge lag that can run hours or days, so the blank window follows whenever merges fall behind, not a particular clock boundary. Judge the fault by the restart-recovery signature and a fixed-window query, not by where the gap sits on the trend.
What should I record before making the change?
Export the aahStorage key, note whether UseFileCacheForRetrieval already exists and with what type and data, save one fixed-window query result that shows the gap, and write down the installed release and patch level. That record reverses the change exactly and gives support the facts if the gap survives it.