I am loading a large number of entities and then trying to save. This is part of a load module loading historic data into the system.
Is there a limit to the number of entities I can try to save at once? I know there is a 1gb limit on the .net process but I have done testing where by the process is around 400mb and it still instantly fails on saving.
Output attached below.
System.Transactions Critical: 0 : <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"><TraceIdentifier>http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled</TraceIdentifier><Description>Unhandled exception</Description><AppDomain>RingKing.vshost.exe</AppDomain><Exception><ExceptionType>IdeaBlade.EntityModel.EntityManagerSaveException, IdeaBlade.EntityModel, Version=6.1.4.0, Culture=neutral, PublicKeyToken=287b5094865421c0</ExceptionType><Message>Exception of type 'System.OutOfMemoryException' was thrown.</Message><StackTrace> at IdeaBlade.EntityModel.AsyncProcessor`1.&lt;&gt;c__DisplayClass2.&lt;.ctor&gt;b__0(TArgs args)
at IdeaBlade.EntityModel.AsyncProcessor`1.Signal()
at IdeaBlade.EntityModel.AsyncProcessor`1.&lt;Execute&gt;b__5(Object x)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()</StackTrace><ExceptionString>IdeaBlade.EntityModel.EntityManagerSaveException: Exception of type 'System.OutOfMemoryException' was thrown. ---&gt; System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at IdeaBlade.EntityModel.EntityServerProxy.CheckConnection(Exception e)
at IdeaBlade.EntityModel.EntityServerProxy.ExecFunc[T](Func`1 func, Boolean funcWillHandleException)
at IdeaBlade.EntityModel.EntityServerProxy.ExecuteOnServer[T](Func`1 func, Boolean funcWillHandleException)
at IdeaBlade.EntityModel.EntityServerProxy.SaveChanges(SaveWorkState workState)
at IdeaBlade.EntityModel.EntityManager.SaveEntitiesCore(SaveWorkState workState)
--- End of inner exception stack trace ---
at IdeaBlade.EntityModel.AsyncProcessor`1.&lt;&gt;c__DisplayClass2.&lt;.ctor&gt;b__0(TArgs args)
at IdeaBlade.EntityModel.AsyncProcessor`1.Signal()
at IdeaBlade.EntityModel.AsyncProcessor`1.&lt;Execute&gt;b__5(Object x)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()</ExceptionString><InnerException><ExceptionType>System.OutOfMemoryException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</ExceptionType><Message>Exception of type 'System.OutOfMemoryException' was thrown.</Message><StackTrace> at IdeaBlade.EntityModel.EntityServerProxy.CheckConnection(Exception e)
at IdeaBlade.EntityModel.EntityServerProxy.ExecFunc[T](Func`1 func, Boolean funcWillHandleException)
at IdeaBlade.EntityModel.EntityServerProxy.ExecuteOnServer[T](Func`1 func, Boolean funcWillHandleException)
at IdeaBlade.EntityModel.EntityServerProxy.SaveChanges(SaveWorkState workState)
at IdeaBlade.EntityModel.EntityManager.SaveEntitiesCore(SaveWorkState workState)</StackTrace><ExceptionString>System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at IdeaBlade.EntityModel.EntityServerProxy.CheckConnection(Exception e)
at IdeaBlade.EntityModel.EntityServerProxy.ExecFunc[T](Func`1 func, Boolean funcWillHandleException)
at IdeaBlade.EntityModel.EntityServerProxy.ExecuteOnServer[T](Func`1 func, Boolean funcWillHandleException)
at IdeaBlade.EntityModel.EntityServerProxy.SaveChanges(SaveWorkState workState)
at IdeaBlade.EntityModel.EntityManager.SaveEntitiesCore(SaveWorkState workState)</ExceptionString></InnerException></Exception></TraceRecord>