This project has moved and is read-only. For the latest updates, please go here.

OutOfMemory error

Oct 18, 2010 at 5:51 AM

Hello

I am running the PersistentDictionary object runtime version 2.0.50727.  I am using it to store a large number (~1 million) of strings values containing aproximately 50 characters each.  The key is an increasing DateTime value.

After a random number of inserts  I get the following error;

Microsoft.Isam.Esent.Interop.EsentErrorException was unhandled
  Message=Error OutOfMemory (JET_errOutOfMemory, Out of Memory)
  Source=Esent.Interop
  ErrorDescription=JET_errOutOfMemory, Out of Memory
  StackTrace:
       at Microsoft.Isam.Esent.Interop.Api.Check(Int32 err)
       at Microsoft.Isam.Esent.Interop.Api.JetUpdate(JET_SESID sesid, JET_TABLEID tableid, Byte[] bookmark, Int32 bookmarkSize, Int32& actualBookmarkSize)
       at Microsoft.Isam.Esent.Interop.Update.Save(Byte[] bookmark, Int32 bookmarkSize, Int32& actualBookmarkSize)
       at Microsoft.Isam.Esent.Interop.Update.Save()
       at Microsoft.Isam.Esent.Collections.Generic.PersistentDictionaryCursor`2.Insert(KeyValuePair`2 data)
       at Microsoft.Isam.Esent.Collections.Generic.PersistentDictionary`2.<>c__DisplayClass22.<Add>b__20(PersistentDictionaryCursor`2 cursor)
       at Microsoft.Isam.Esent.Collections.Generic.PersistentDictionary`2.UsingCursor(Action`1 action)
       at Microsoft.Isam.Esent.Collections.Generic.PersistentDictionary`2.Add(KeyValuePair`2 item)
       at Microsoft.Isam.Esent.Collections.Generic.PersistentDictionary`2.Add(TKey key, TValue value)
       at AnalysisDB.Form1.StoreBar(OHLCBar bar)
       at AnalysisDB.Form1.button3_Click(Object sender, EventArgs e)
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at AnalysisDB.Program.Main()
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

My system memory has not significantly increased during this process and I have pleanty of headroom on my 8GB RAM system.  Does anyone have an idea of what is going on?

Thanks,

Doug

Oct 27, 2010 at 8:26 PM

Can you try with the latest source code? The 1.5 binary would occasionally hit this and I changed some configuration parameters to avoid it.