<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : OutOfMemoryException Saving Entities</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : OutOfMemoryException Saving Entities</description>
  <pubDate>Wed, 13 May 2026 01:03:15 -700</pubDate>
  <lastBuildDate>Thu, 13 Sep 2012 09:33:12 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=3211</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>OutOfMemoryException Saving Entities :   Hi Matt,It&amp;#039;s unlikely...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3211&amp;PID=14430#14430</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 3211<br /><strong>Posted:</strong> 13-Sep-2012 at 9:33am<br /><br />Hi Matt,<div>&nbsp;</div><div>It's unlikely that a&nbsp;timeout would cause an OutOfMemoryException. (maybe the other way around)</div><div>&nbsp;</div><div>Approx how many entities are you trying to save when the issue happens? Are they all of the same type? How are they related?</div><div>&nbsp;</div><div>Silvio.</div>]]>
   </description>
   <pubDate>Thu, 13 Sep 2012 09:33:12 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3211&amp;PID=14430#14430</guid>
  </item> 
  <item>
   <title>OutOfMemoryException Saving Entities : I&amp;#039;m seeing the same error....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3211&amp;PID=14389#14389</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1499" rel="nofollow">matt.cavagnaro</a><br /><strong>Subject:</strong> 3211<br /><strong>Posted:</strong> 10-Sep-2012 at 1:09pm<br /><br />I'm seeing the same error. From <a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/understand-timeouts" target="_blank">what I've read</a> this looks like some kind of timeout issue. Not sure how to work around this yet though.<br><br>Reading more about the SaveOptions now, but would be curious to know what other people think.<br>]]>
   </description>
   <pubDate>Mon, 10 Sep 2012 13:09:18 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3211&amp;PID=14389#14389</guid>
  </item> 
  <item>
   <title>OutOfMemoryException Saving Entities : Ok thanks. I know I could use...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3211&amp;PID=12453#12453</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1375" rel="nofollow">murray.bryant</a><br /><strong>Subject:</strong> 3211<br /><strong>Posted:</strong> 12-Jan-2012 at 3:52pm<br /><br />Ok thanks. I know I could use bulk copy but that limits me to sql server. There is a chance I will have to support another database in the future so would like to load through devforce.<div><br></div><div><div>I am now having another issue.</div></div><div><br></div><div>When I call a save I am getting the following error</div><div><br></div><div>--</div><div>The transaction associated with the current connection has completed but has not been disposed. &nbsp;The transaction must be disposed before the connection can be used to execute SQL statements.</div><div><br></div><div>--</div><div><br></div><div>Are my batches still to big?</div><div><br></div><div>Or is this related to something else.</div><div><br>Thanks</div><div><br>Murray</div><div><br></div>]]>
   </description>
   <pubDate>Thu, 12 Jan 2012 15:52:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3211&amp;PID=12453#12453</guid>
  </item> 
  <item>
   <title>OutOfMemoryException Saving Entities : Honestly, if you are loading bulk...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3211&amp;PID=12441#12441</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=449" rel="nofollow">smi-mark</a><br /><strong>Subject:</strong> 3211<br /><strong>Posted:</strong> 12-Jan-2012 at 6:29am<br /><br />Honestly, if you are loading bulk data Entity Framework isn't really the answer. How much data are you loading? Have you looked into using BulkCopy? <br><br>One option is to do it in batches, say every 200-300 records call a save, then continue.<br>]]>
   </description>
   <pubDate>Thu, 12 Jan 2012 06:29:51 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3211&amp;PID=12441#12441</guid>
  </item> 
  <item>
   <title>OutOfMemoryException Saving Entities : HiI am loading a large number...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3211&amp;PID=12438#12438</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1375" rel="nofollow">murray.bryant</a><br /><strong>Subject:</strong> 3211<br /><strong>Posted:</strong> 11-Jan-2012 at 9:48pm<br /><br />Hi<div><br></div><div>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.</div><div><br>I can load the data from source into memory. But as soon as I try to save I get a&nbsp;System.OutOfMemoryException.</div><div><br></div><div>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.</div><div><br></div><div>Do you have any ideas how I can work out what this limit is on a machine.&nbsp;</div><div><br></div><div>Output attached below.</div><div><br></div><div>App is WPF</div><div><br></div><div>thanks</div><div><br></div><div>Murray</div><div><br></div><div><br></div><div><br></div><div><br></div><div><div>System.Transactions Critical: 0 : &lt;TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Critical"&gt;&lt;TraceIdentifier&gt;http://msdn.microsoft.com/TraceCodes/System/ActivityTracing/2004/07/Reliability/Exception/Unhandled&lt;/TraceIdentifier&gt;&lt;Description&gt;Unhandled exception&lt;/Description&gt;&lt;AppDomain&gt;RingKing.vshost.exe&lt;/AppDomain&gt;&lt;Exception&gt;&lt;ExceptionType&gt;IdeaBlade.EntityModel.EntityManagerSaveException, IdeaBlade.EntityModel, Version=6.1.4.0, Culture=neutral, PublicKeyToken=287b5094865421c0&lt;/ExceptionType&gt;&lt;Message&gt;Exception of type 'System.OutOfMemoryException' was thrown.&lt;/Message&gt;&lt;StackTrace&gt; &nbsp; at IdeaBlade.EntityModel.AsyncProcessor`1.&amp;amp;lt;&amp;amp;gt;c__DisplayClass2.&amp;amp;lt;.ctor&amp;amp;gt;b__0(TArgs args)</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.AsyncProcessor`1.Signal()</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.AsyncProcessor`1.&amp;amp;lt;Execute&amp;amp;gt;b__5(Object x)</div><div>&nbsp; &nbsp;at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)</div><div>&nbsp; &nbsp;at System.Threading.ExecutionContext.runTryCode(Object userData)</div><div>&nbsp; &nbsp;at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)</div><div>&nbsp; &nbsp;at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)</div><div>&nbsp; &nbsp;at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)</div><div>&nbsp; &nbsp;at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()</div><div>&nbsp; &nbsp;at System.Threading.ThreadPoolWorkQueue.Dispatch()</div><div>&nbsp; &nbsp;at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()&lt;/StackTrace&gt;&lt;ExceptionString&gt;IdeaBlade.EntityModel.EntityManagerSaveException: Exception of type 'System.OutOfMemoryException' was thrown. ---&amp;amp;gt; System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.EntityServerProxy.CheckConnection(Exception e)</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.EntityServerProxy.ExecFunc&#091;T&#093;(Func`1 func, Boolean funcWillHandleException)</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.EntityServerProxy.ExecuteOnServer&#091;T&#093;(Func`1 func, Boolean funcWillHandleException)</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.EntityServerProxy.SaveChanges(SaveWorkState workState)</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.EntityManager.SaveEntitiesCore(SaveWorkState workState)</div><div>&nbsp; &nbsp;--- End of inner exception stack trace ---</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.AsyncProcessor`1.&amp;amp;lt;&amp;amp;gt;c__DisplayClass2.&amp;amp;lt;.ctor&amp;amp;gt;b__0(TArgs args)</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.AsyncProcessor`1.Signal()</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.AsyncProcessor`1.&amp;amp;lt;Execute&amp;amp;gt;b__5(Object x)</div><div>&nbsp; &nbsp;at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)</div><div>&nbsp; &nbsp;at System.Threading.ExecutionContext.runTryCode(Object userData)</div><div>&nbsp; &nbsp;at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)</div><div>&nbsp; &nbsp;at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)</div><div>&nbsp; &nbsp;at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)</div><div>&nbsp; &nbsp;at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()</div><div>&nbsp; &nbsp;at System.Threading.ThreadPoolWorkQueue.Dispatch()</div><div>&nbsp; &nbsp;at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()&lt;/ExceptionString&gt;&lt;InnerException&gt;&lt;ExceptionType&gt;System.OutOfMemoryException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089&lt;/ExceptionType&gt;&lt;Message&gt;Exception of type 'System.OutOfMemoryException' was thrown.&lt;/Message&gt;&lt;StackTrace&gt; &nbsp; at IdeaBlade.EntityModel.EntityServerProxy.CheckConnection(Exception e)</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.EntityServerProxy.ExecFunc&#091;T&#093;(Func`1 func, Boolean funcWillHandleException)</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.EntityServerProxy.ExecuteOnServer&#091;T&#093;(Func`1 func, Boolean funcWillHandleException)</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.EntityServerProxy.SaveChanges(SaveWorkState workState)</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.EntityManager.SaveEntitiesCore(SaveWorkState workState)&lt;/StackTrace&gt;&lt;ExceptionString&gt;System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.EntityServerProxy.CheckConnection(Exception e)</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.EntityServerProxy.ExecFunc&#091;T&#093;(Func`1 func, Boolean funcWillHandleException)</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.EntityServerProxy.ExecuteOnServer&#091;T&#093;(Func`1 func, Boolean funcWillHandleException)</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.EntityServerProxy.SaveChanges(SaveWorkState workState)</div><div>&nbsp; &nbsp;at IdeaBlade.EntityModel.EntityManager.SaveEntitiesCore(SaveWorkState workState)&lt;/ExceptionString&gt;&lt;/InnerException&gt;&lt;/Exception&gt;&lt;/TraceRecord&gt;</div></div>]]>
   </description>
   <pubDate>Wed, 11 Jan 2012 21:48:11 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3211&amp;PID=12438#12438</guid>
  </item> 
 </channel>
</rss>