Historian View crash when searching for old data

Short form question (details later on) : Is it possible to perform a historic search in a very large archive database (storing 3 PMU of data, around 25 points per PMU for multiple years)? If yes, how to proceed without crashing historian view ?

Thanks
Michel Mont-Briant

Details:
We have an installation where data is saved onto a very large disk. At the moment, the database runs from 2015-11-05 until now and use up to 2.25TB (about 24,000 .D files of 102MB each)

Yesterday, while performing a historical search (a single trace, 4 minutes long, but over a year ago, 2016-05-05), the historian view took a very very long time to respond. When I checked on the task manager, historian view used more and more memory but still was “trying”. I left that search run for the night but this morming, I got a windows message that the program stopped with the following details :
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: HistorianView.exe
Problem Signature 02: 2.1.89.0
Problem Signature 03: 55ba225e
Problem Signature 04: System.Core
Problem Signature 05: 4.0.30319.34209
Problem Signature 06: 53489a70
Problem Signature 07: 452
Problem Signature 08: 3b
Problem Signature 09: System.OverflowException
OS Version: 6.1.7601.2.1.0.256.48
Locale ID: 1033
Additional Information 1: 280c
Additional Information 2: 280c60ccdf064aa035fbc5d2253baf72
Additional Information 3: 72ac
Additional Information 4: 72ac9968619ae642c9d8bf67555e860e

The task manager showed HistorianView using 305MB of memory !

In the Windows log/ Application, two errors were found (one .NET and one application)
Application error:

  • 1000 2 100 0x80000000000000 40300 Application MNTROTHERY
  • HistorianView.exe 2.1.89.0 55ba225e KERNELBASE.dll 6.1.7601.19018 560a0094 e0434352 000000000000b3dd 128c 01d1c662a130607f D:\openPDC\HistorianView.exe C:\Windows\system32\KERNELBASE.dll 49d21ff6-5b81-11e7-860e-989096b74f68

and here is the .NET error:

  • 1026 2 0 0x80000000000000 40299 Application MNTROTHERY
  • Application: HistorianView.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.OverflowException Stack: at System.Linq.Enumerable.Count[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Collections.Generic.IEnumerable`1) at HistorianView.ChartWindow.UpdateChart() at HistorianView.MainWindow.TrendRequested() at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean) at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs) at System.Windows.Controls.Button.OnClick() at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs) at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object) at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean) at System.Windows.UIElement.ReRaiseEventAs(System.Windows.DependencyObject, System.Windows.RoutedEventArgs, System.Windows.RoutedEvent) at System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate, System.Object) at System.Windows.EventRoute.InvokeHandlersImpl(System.Object, System.Windows.RoutedEventArgs, Boolean) at System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject, System.Windows.RoutedEventArgs) at System.Windows.UIElement.RaiseTrustedEvent(System.Windows.RoutedEventArgs) at System.Windows.Input.InputManager.ProcessStagingArea() at System.Windows.Input.InputProviderSite.ReportInput(System.Windows.Input.InputReport) at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr, System.Windows.Input.InputMode, Int32, System.Windows.Input.RawMouseActions, Int32, Int32, Int32) at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr, MS.Internal.Interop.WindowMessage, IntPtr, IntPtr, Boolean ByRef) at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr) at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef) at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef) at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame) at System.Windows.Application.RunInternal(System.Windows.Window) at System.Windows.Application.Run() at HistorianView.App.Main()

The Historian Trending Tool shouldn’t be consuming very much memory just to read 4 minutes of historic data. If it’s taking significantly more time than it would to query the last 4 minutes of data, something has gone wrong. I would suggest double-checking your start time and end time to make sure you are actually querying 4 minutes. For instance, I have made the mistake before of accidentally querying 1 year and 5 minutes of data when I thought I was querying 5 minutes because I didn’t properly update the date for the UTC End Time.