Anyone familiar with System.OutOfMemoryException ?

By Shellbot ·
I've googled, and found some interesting bits but a lot of them relate to MS Reporting Services, BizTalk etc.

Basically, have a C# application accessing a SQL database. For months now we've been getting the: System.OutOfMemoryException and the web app crashes. I just go and reboot the web server and its fine.

Now, when this first started happening, it was happening every 10-12 days without fail, but now it seems to be a bit more random. Will happen 3 times in one day, then be fine for 4-10 days. Then 3 days in a row, then nothing for a week.

Our hardware company (outsourced)maintains that there is nothing wrong with the server, there is plenty of memory, and it should not be happening, and maybe its a memory leak in the application and our software guys should check the app.

Our software company (outsourced) maintains that there is a problem with the memory and our hardware guys should fix it.

Meanwhile, I'm stuck in the middle. Has anyone had any similar experiences?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

This might give you a few clues

by Tony Hopkinson In reply to Anyone familiar with Syst ...
or more correctly your softwsre supplier.

System.OutOfMemory has nothing to do with hardware, except in this sort of situation it will get raised more if you have less.

Unmanaged objects was raised as a possibility, you don't happen to know if the c# version was a port from C++ do you?

If it was that's the first place I'd look. The garbage collector was invented becasue most C++ coders are outright crap at lifetime management.

Collapse -

thanks tony

by Shellbot In reply to This might give you a few ...

i'll go have a read of that this morning!

Well, i've been maintaining that it is not a hardware problem, and basically the development company can't be bothered to go check the app

I'm pretty certain the code was actually written in C#, as its a bespoke application. So unless they had a similar app they just ported over and rehashed..? I wouldn't put it past these guys.

From Jan 1,2005 to June 2006, this problem had never May we got a bit of work done, enhancements, bug fixes etc..and about 3 weeks later this started happening.

Unfortuneatly I'm only hired as a DBA, so my boss seems to think that my programming skills are not required to resolve this matter how many times i put my hand in there air, scream "over here..i might know the answer" my comments and attempts to resolve the issue are overlooked..(long standing issue with employer)

Off i go to read..
thanks :)

Collapse -


by Shellbot In reply to This might give you a few ...

I should have grabbed a cup of coffee before digging into that..

I get it though, not to say I'm even close to completely understanding it..but i get the concept.

I have a feeling if i send this onto the dev company they will look at me like I'm an alien!! But all i can do is try

Collapse -

You don't have to send that

by Tony Hopkinson In reply to ouch..

Even if the machine was struggling for physical ram, all that would mean is it would hit the swap file. My BS filters went into turbo mode as soon as I read that ah justification.

Brown dandruff everywhere, I despise people who take the urine like that. If it was a hardware fault why would it only affect their code? I'd expect to see an event log riddled with warnings and faults.

Collapse -


by Shellbot In reply to You don't have to send th ...

well i'm really not sure what to do..because my boss(s) want to bring in some company with this huge server to do a test to see if ramping up the machine will do any good.

i've given my opinion that obviously it would help in the short term, maybe i'm wrong, but if its problem is in the application, its not going to make a whole lot of difference, because it will only eat up the extra memory anyways..ok, maybe i'm not right on that, but its treating the symptom, not the cause.

Funny thing, these guys who developed the application, i have asked for the source code, code behind and or solution files right (they were susposed to hand it over months ago)..yesterday they told me "its all there, on the server" I asked did they have a copy..nope..its all there on the the voices in my head are saying "WHAT..the only copy of the solution is on a LIVE server..holy..."
So after talking with them, politely, i realise they don't know what i am talking about..when i said i was unable to find it, they directed me to the wwwroot folder.. "see all the asp pages are in there"

So i casually ask about the <applicationname>.dll in the bin, and the guy says, oh you don't need to know that code, thats just an include file to make the application work. You wouldn;t be interested in that, its all techie stuff..

I told him I'd get back to him..need way more coffee before i deal with this chap again. He's a web developer..and SQL developer I'm told...

This week won't be over quick enough

Collapse -

Shelly you should be full of Coffee now

by HAL 9000 Moderator In reply to yup

But I think that you'll find yourself bashing your head against a brick wall and if your not you should be as it's less painful than attempting to deal with Ijots like this one.

Why would you need all that Technical Stuff and more importantly how do you know about it?

Because of where you are I would let your Boss solve the problem a Massive Server something like a 2,000 CPU Blade with unlimited Memory should cure your problem permanently though it's a Tad Expensive but if your Boss tells her Boss that it has to be done you're out of the picture and more importantly not in the firing line.

But I think that you'll find Tony is correct this C thing will be based on a C++ piece of Crap and pulling your system down as it leaks at an intermediate rate causing system crashes without warning or even showing a single Event in the Logs to attempt to explain what is happening.

I'll bet you $ to Donuts that the problem will eventually be found in some Compiled Code that's if it's ever traced down properly and not just have the symptom treated.

OH My God What Have I done? I know absolutely nothing about programing at all and I've never heard of C or any thing like that Honest!!!!!! Now what does DLL actually stand for? I seem to remember something about Do Ladies Listen is that it? :^0


Collapse -

tech stuff :)

by Shellbot In reply to Shelly you should be full ...

You know sometimes when you've smiled that big polite smile for ages and you just can't anymore and you just want to ram your monitor down..or up somewhere..?

thats the stage i was at when with these chaps.. i guess looking back, how silly of me to question them when they were explaining that the ASP pages ARE the source does, and that DLL file is just a bit of techie stuff...i'm just a silly girl i guess <toss head, giggle giggle>
<i>causing system crashes without warning or even showing a single Event in the Logs to attempt to explain what is happening.</i><br>

Thats it in a nutshell..i'm going to look further into this..been looking at a few of the things they've done, and some of it looks like they've got a C programmer..

But what do i know.. <insert giggle>

Collapse -

Analyze the dump of the OutOfMemory crash

by raven_tl In reply to tech stuff :)

If you get a crash you can get a dump of the memory by using ADPlus or DebugDiag and analyze it with WinDBG. It is alot easier if you have the symbols (.pdb files). Even if you cannot get the exact cause you will find what process (dll) is causing the problem so you have some more information.

Collapse -

I could think of a few other titles

by Tony Hopkinson In reply to yup

but I'll stay polite and say inexperienced.
"All techie stuff", impressive customer facing skills I must say.

I'll wager a doughnut along with Col that the dll leaks like a sieve and at least some of it was not written in C#.

Do you have a test environment with this on.
You might get some joy out of monitoring IIS's memory usage while calling up pages which use the dll.

Collapse -

i'll see your doghnut

by Shellbot In reply to I could think of a few ot ...

and raise it 2 more..

Yes, impressive customer facing skills. I must admit though, it takes skill to compile a team of completly inadequate staff members. These guys are incredible..

They been working for the last week trying to fix an export (to a .csv) that keeps timing out..funny thing is, i told them where its going wrong..and they still can't sort it..but i guess thats some of that "techie stuff" that i shouldn't know :)

No test env at min, but will have soon, so i think i'll set aside a few days watching it :)

I think you guys are right though..its the direction i was thinking in, so its nice to see that i'm probably not completely off base!

Related Discussions

Related Forums