IMD SolutionComputing LibraryShop main store

Troubleshooting

Why the historian query tool keeps freezing after restart

Edge computing and IIoT Published 5 min read

Short answer

The freeze recurs because a failed snapshot merge left a .skip marker and a backlog of unmerged snapshots that every retrieval must scan; a service restart only resets state. Read original-merge.log for the recorded reason, correct that cause with the vendor's documented recovery, then re-check the block after one hour before calling it fixed.

On this page
  1. The fault is in the block, not the query tool
  2. Why deleting the marker did not hold
  3. Size the backlog before touching the block
  4. What each action actually buys
  5. The repair sequence
  6. Prove the repair survives a restart
  7. Questions asked

The query tool freezes again because a snapshot merge failed in one history block and left a .skip marker plus a growing backlog of unmerged snapshots. Retrieval must scan every unmerged snapshot in a block to find the requested data, so a request that ran in seconds now hangs. Restarting the historian service resets service state and buys minutes; it repairs neither the block nor the condition that blocks the merge, which is why the freeze returns. The repair path is specific: read original-merge.log for the recorded failure reason, correct that cause with the manufacturer's documented recovery, and re-check the block after one hour for a recreated marker before you trust any improvement.

The fault is in the block, not the query tool #

A .skip file appears in a history block when a snapshot merge fails — for example, when corruption is detected in a data file. The filename is only a flag; the reason is recorded in original-merge.log in the merge diagnostics for the affected block. Retrieval performance depends heavily on snapshot merging: once a block has accumulated too many unmerged data snapshots, every retrieval scans all of them, and the symptom surfaces as a query tool that opens but never returns results. From the operator's chair that looks like a client or network fault; it is neither. Do not change tag bindings, drivers or the SQL text while the real variable is storage.

Capture the failure while it is live, before the next restart destroys the timing context: the query text, the requested tags, the time range, and whether the tool hangs on opening or only after submitting. Then match those timestamps against the merge log entries. Reading the native diagnostic before assigning cause is the same discipline as tracing a SQL log error after a historian migration.

Why deleting the marker did not hold #

Removing .skip removes the flag, not the condition. If the data-file damage, access error or storage fault that failed the merge is still present, the next merge attempt fails the same way and recreates the marker — exactly the recurrence already observed. The one-hour recheck is the test, not the fix: after a recovery that includes removing the marker, inspect the block again after one hour. A recreated marker means the failure condition is still active, and original-merge.log now holds a fresh entry naming it. Deleting the marker a second time without a new reason is repetition, not troubleshooting.

Size the backlog before touching the block #

Worked example with illustrative numbers — substitute your own from the logs. Suppose snapshots in your installation are cut once per hour, and the first failure entry in original-merge.log is stamped ten days before you investigate. The block then holds 10 days × 24 snapshots/day = 240 unmerged snapshots, and a retrieval touching it searches up to 240 snapshots per tag instead of one merged store: a 240× search multiplier with no change to the SQL text.

The multiplier is what moves the number. Halve the days since the first failure and the snapshot count halves; if your installation cuts snapshots every 30 minutes, the same ten days is 10 × 48 = 480 snapshots and the multiplier doubles. The decision this buys: the span between the first failure entry and now, multiplied by the snapshot cadence, tells you whether you are chasing one failed merge or a block that has been degrading for weeks — and therefore whether a single documented recovery clears it or the block goes to the manufacturer's repair path.

What each action actually buys #

Action Observed result Decision
Restart the historian service Tool works briefly, then freezes Controlled recovery to keep access during investigation; never evidence of repair
Reindex history No change Stop repeating it; it addresses a different part of retrieval
Delete the .skip file Marker gone, freeze persists or returns Only inside the documented recovery, after reading original-merge.log
Fix the failed snapshot merge Not yet attempted The actual repair; sequence below

One more cost of the repeated restarts: verify that acquisition survived them, because overnight data gaps after a historian restart have a separate cause and fix.

The repair sequence #

One safety note before the list: manual deletion of snapshot folders or block internals is a data-loss action, not a recovery step — keep every intervention inside the manufacturer's documented procedure for your installed version.

  1. Preserve the block and its diagnostics. Keep the backup already taken and copy the current merge logs before anything else changes.
  2. Read the failure reason in original-merge.log for the affected block, and match its timestamp to the .skip marker and to the period of slow retrieval.
  3. Correct the named cause. A damaged data file goes to the manufacturer's documented repair or restore procedure; an access or storage failure is resolved at its source before any retry.
  4. Apply the documented merge recovery for the installed version. If that procedure includes removing .skip, it happens here — not before step 3.
  5. Re-check the block after one hour for a recreated marker.
  6. Confirm the outcome in the subsequent merge log entries before declaring the block healthy.

Prove the repair survives a restart #

Run the identical request before and after the corrective work; changing the query and the storage condition together makes a faster result unreadable.

  • Open the query tool without restarting the historian service.
  • Run a narrowly bounded query over only the affected interval — same tags, reduced range — and record the completion time.
  • Run the previously failing SQL request with the same tags and the same time range.
  • Inspect the affected block for a recreated .skip file and read the latest merge log entries.
  • Repeat the retrieval after continued operation, including the one-hour marker check, to separate sustained recovery from the brief improvement a restart always buys.

The bounded query doubles as the isolation test while the fault is live: hold the tag selection fixed and shrink the time range, then hold the range and change the tags. A hang that follows the range indicts the block; a hang that follows one tag indicts that tag's data. A different symptom — a trend that draws flat across a wide range — has its own cause in the Query Row Limit flat-line check.

Questions asked

What do the subfolders beginning with M and S inside a history block mean?

Their presence and count vary between blocks, and the prefixes alone do not classify their contents or prove a fault. Identify them only against the storage-layout documentation for your installed historian product and version. Treat them as hands-off: internal block layouts can contain files required for valid retrieval, so deleting M or S folders to free space or speed queries is a data-loss action, not a repair.

How do you tell a completed merge from one still running?

Elapsed time alone does not: one hour is the marker-recheck interval, not a guaranteed completion time for a large block. The evidence is threefold. The .skip marker has not been recreated, the subsequent merge log entries show successful processing rather than a new failure, and a bounded query over the affected interval completes. If the marker returns, preserve the new log entry and fix its cause before any retry.

Does reindexing help a failed snapshot merge?

No. Reindexing and snapshot merging address different parts of the retrieval path, so reindexing cannot touch a fault that lives in the merge subsystem, which is why it changed nothing in this failure pattern. Repeat it only when a fresh diagnostic points at the index itself. The artifacts that identify this fault are the .skip marker and the reason recorded in original-merge.log.

The merges now complete but the query tool still hangs. What next?

Separate the client path from the server path. Compare opening the tool with executing a stored request: a hang on open points client-side, a hang only after submitting points retrieval-side. Review client and historian diagnostics at matching timestamps, and confirm the historian service completes the retrieval rather than dropping the session. With merges proven healthy, the remaining fault is no longer in the block.

Keep reading

  • How-to

    Export historian trend CSV at one-minute intervals

    Export the trend's recorded values and you get change-based events, about 17 minutes apart in this case, because the historian stores a value only when it changes. To get one row every minute, query the tag in the Query tool with regularly spaced retrieval at a 60-second interval and export that result; the grid comes from retrieval, not storage.

    Edge computing and IIoT

  • Troubleshooting

    Why the Ignition Edge historian keeps disappearing

    The Edge historian disappears because its saved record, not its module, is disabled: the EdgeHistorian row in config.idb's TAGHISTORYPROVIDEREP table carries ENABLED = 0, so startup skips registering the provider while Tag Historian reports Running. Back up config.idb, set ENABLED to 1, and the provider holds across reboots; a module restart only restores it until the next start.

    Edge computing and IIoT

  • How-to

    How to log a tag only when another tag is true in Historian

    Create an event tag whose Snapshot action fires when Tag B becomes 1 to store one Tag A value per activation. For every value while Tag B stays 1, keep cyclic storage and filter at retrieval. With Historian rated at 150,000 values per second sustained, a two-tag system is limited by acquisition, not storage.

    Edge computing and IIoT

Auto restart Node-RED in Docker after exit code 255