Solved

WCF Memory Issue

Posted on 2013-11-22
4
69 Views
Last Modified: 2015-12-28
Hi Experts,

     I have a Windows Mobile application running on a Motorola mobile device (Windows Mobile 6.5, .NET Compact Framework 3.5).  The application communicates with a WCF web service (http binding, XML format, hosted in a windows service (on the server side that is)).

     What I am noticing is that, on the client side, every time I make a call to the web service, the application takes a chunk of the memory and it never releases it back to the app.  The amount of data transferred in each call doesn't seem to make a difference in how much "bite" is taken out of the memory.  Now, we're only talking about maybe 500 KB each time, but when dealing with a mobile device that only has 250 MB of memory in the first place and it limits the amount of available memory per application, you run out of memory rather quickly and you start getting OutOfMemoryExceptions in the oddest places.  I don't think that it's any other part of my application, because even if all I do is start the app and do nothing else but fire the same web service call over and over again (with virtually no data being passed in each call (other than WCF overhead)), eventually the application runs out of memory.

      Has anyone else seen this before?  If yes, what's going on and how do I fix it?

      This problem is making the application completely unusable; I am in desperate need of help!

Thanks in advance!!!!
0
Comment
Question by:axnst2
  • 2
4 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 250 total points
ID: 39671392
Have you used a profiler to investigate this issue?

If you have the Ultimate edition, that version comes with a profiler.
0
 
LVL 2

Assisted Solution

by:Pavel_Kudishin
Pavel_Kudishin earned 250 total points
ID: 39672779
Check that you release managed and not-managed resources after every call, close connection.
0
 

Author Comment

by:axnst2
ID: 39757490
This is not a memory issue caused by me.  What I'm trying to find out is if there are any built in WCF settings that would cache/ hold on to data until I tell it to clear it....or anything else like that...
0
 

Author Closing Comment

by:axnst2
ID: 41386715
The question has not really been resolved, but I want to clean this up.  Thanks for the attempt anyways!
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question