-
July 11th, 2013, 01:40 AM
#1
Sockets dying with heavy memory use
I have an app that runs a server (CLI) on a Windows 2008 Server. It runs a standard listen socket with max sockets and works great until someone uses a large number of system resources (Remote Desktop in, Team Source Explorer, etc.). Then the app stops responding on the port, but still is running. I can run it as either a Windows Service or as a Console App, but the problem is still there. Sometimes it calls the accept() then dies right away.
Anyone with any ideas why this is happening? This is a license server for a product, and we cannot have this dying all of the time.
Thank you.
-Erik
-
July 16th, 2013, 05:54 AM
#2
Re: Sockets dying with heavy memory use
-
August 12th, 2013, 08:37 AM
#3
Re: Sockets dying with heavy memory use
Have you checked to see if the program is leaking memory? I had a .net app that was leaking memory somehow, through the socket construct. When it ran out of resources, it would do the same thing and die on accept. I think that this is just a symptom of whatever malady is eating you memory. Have a look in the system resources with Task Manager. Look at your process, and watch the memory consumption, does it fluctuate? Then connect to it with a remote session and see what happens. Is it possible to remote debug this app?
ahoodin
To keep the plot moving, that's why.
-
August 12th, 2013, 10:47 AM
#4
Re: Sockets dying with heavy memory use
Thanks for the response.
I finally rewrote it using a single thread rather than the multiple threads that had before. Haven't had a crash in two weeks now. So you are right, it probably was too much memory use.
-Erik
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|