This is a migrated thread and some comments may be shown as answers.

System.OutOfMemoryException on WCF Web Service with Telerik ORM

3 Answers 101 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Heiko
Top achievements
Rank 1
Heiko asked on 21 Oct 2009, 08:59 AM
Hi Telerik Team,

I'm using ORM in combination with WCF Web Services and fixed already a lot of issues in this topic.

Now I stuggle on a System.OutOfMemoryException when performing an import process where a lot of objects are beeing created.

The effect is that the ASPNET_WP.EXE blows up to 1.4 GB and the exception will be thrown.

I already tried to implement IDisposable and calling the Garbare Collector (GC.Collect()) in that responsable functions, but no effect.

The Server is a QuadCore (C2Q) with 4 GB RAM. Even if there is more RAM free than 1,4 GB the exception is always thrown when the aspnet_wp.exe reaches 1.4 GB.

What can I do to avoid these OutOfMemory issues?


The exact exception message is:

System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at
OpenAccessRuntime.DataObjects.PersistenceManagerFactoryBase.
CreatePersistenceMangerImp(StorageManger sm)
at
....




Thanks a lot !!!

Heiko

3 Answers, 1 is accepted

Sort by
0
Alexander
Telerik team
answered on 23 Oct 2009, 10:19 AM
Hello Heiko,

Is it possible that you are adding a large amount of objects in a single transaction? You can try using the IObjectScope.Transaction.Flush() method at some points to flush the new and dirty objects to the database and clear the cache. Using more separate transactions would have the same effect as well. Please let us know if this helps.

Greetings,
Alexander
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Heiko
Top achievements
Rank 1
answered on 24 Oct 2009, 12:16 PM
Hi Alexander,

Thanks for your help. This is much appreciated!!

I implemented this Scope.Transaction.Flush() in my generic functions. But without any change in behavior.

Can this be an issue of the combination of WCF Web Services and Telerik ORM? Such like chaching issues?

I really need a solution on this very quickly.

Any help is very welcome!

Thanks

Heiko
0
Alexander
Telerik team
answered on 26 Oct 2009, 11:00 AM
Hello Heiko,

Many customers use Telerik OpenAccess ORM in a combination with WCF and such problems have not been reported. It seems that something does not get disposed. If you are using many IObjectScope instances, they should be explicitly disposed at the end. If you are not doing this, it may lead to similar behavior.
I would suggest you to take a look at our N-tier WCF example and see the differences between your and our approach. There could be something small but crucial.
At this point we are not able to dig any further into the problem without additional information. Please send us some code from your import methods, so we can check if the object scope is used correctly and try to represent the behavior locally.

Sincerely yours,
Alexander
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Heiko
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Heiko
Top achievements
Rank 1
Share this question
or