[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

C# - Server App - System.Net.Sockets.OverlappedAsyncResult consuming massive memory

Asked by JoshuaO in C# Programming Language, TCP/IP

Tags: C# TCPIP SOCKETS ASYNC SOCKETS

Hello all!  So here goes.  We have a windows service written in c# (.Net 20)
It uses Async Sockets and utilizes the agsXMPP.XML parsing class.

There are two types of clients that connect to this service. We have a DESKTOP client and a WEB CLIENT.  The web client connects and sends data to the server which then relays this data to all connected clients.   The traffic sent to the clients can be a steady constant mash of data depending on the number of visitors on the website.  We have ran memory profilers
and they pin point that System.Net.Sockets.OverlappedAsyncResult -> m_UserObject -> System.Byte[] is the cultprit in the massive ram consumption.

Now we removed a certain section of code so now ONLY packets are sent to desktop client when a visitor hits the site, and when a timer removes stale clients and the ram holds @ about 36megs ...but we need to send updates to the clients on UPDATES. Which could in turn have 20 clients (desktop) and maybe lets say 2000 web clients.  So each 20 desktop clients would get an update packet for each individual web client every 30 seconds.    (when we do activate the update system it works, but the ram shoots up from 36megs to 3gigs in a matter of 30min to an hour and keeps growing and growing till the server locks up for out of memory.

Any help or suggestions would be great !   (I am guesing this is a .net socket issue and that Async BeginSend / BeginReceive are queing and then consuming ram?
[+][-]11/07/09 06:48 AM, ID: 25766493Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/07/09 07:51 AM, ID: 25766692Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/07/09 07:51 AM, ID: 25766696Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/07/09 07:55 AM, ID: 25766714Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625