|
|
| Author |
Message |
External

Since: Jan 08, 2007 Posts: 2
|
(Msg. 1) Posted: Mon Jan 08, 2007 6:59 am
Post subject: IIS throws 'Out of memory' at Server.CreateObject in ASP Archived from groups: microsoft>public>inetserver>iis (more info?)
|
|
|
Hi all
I have an ATL component which is used for reporting formatting running
on IIS, 2003 Std Edition Server. It uses the IResponse object to write
directly to the HTTP stream.
It had been running fine up until recently when it started dying, after
it had been running for a while, returning the COM error code for Out
of memory (OOM), which I then traced down the first Server.CreateObject
call to my control in the ASP script. It seemed to happen around once
or twice a week and then it started happening more frequently. I've
checked my code and I'm not personally returning OOM in any of my code,
so either IIS is returning this code at the point at which it attempts
to create the object or the ATL runtime is returning the OOM code. The
problem can be 'fixed' by running IISRESET, but I'm really struggling
here to actually work out what to try and check next. I imagine that I
will need stress testing to reproduce the problem, so assuming that I
can reproduce with a stress test what can I do when it fails?
We have implemented a temporary restart schedule to reduce the problem
from happening, at since the last reset three hours ago the process
looks like this:
w3wp.exe
Memory usage: 317,428K
Page Faults: 2,422,617
VM: 306,984K
At first I thought it was leaking memory. The memory usage does creep
up very slowly over time, but it doesn't appear to be leaking in MSVC
debug mode. The question is: the object doesn't store anything in
memory beyond page scope so should it be at this amount of memory usage
three hours from starting? Does the system/IIS swell the memory given
to the control over time if it is used a lot or does it look like it is
leaking somewhere? Is it leaking because the amount of VM memory is
very close to the amount allocated? Also, are the page faults very
high for three hours?
Many thanks
Richard >> Stay informed about: IIS throws 'Out of memory' at Server.CreateObject in ASP |
|
| Back to top |
|
 |  |
External

Since: Jan 08, 2007 Posts: 2
|
(Msg. 2) Posted: Mon Jan 15, 2007 3:05 pm
Post subject: Re: IIS throws 'Out of memory' at Server.CreateObject in ASP [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Update: Not to worry, I believe the leak is down to CComBSTRs not being
released correctly, as documented in MSDN.
Richard Hollis wrote:
> Hi all
>
> I have an ATL component which is used for reporting formatting running
> on IIS, 2003 Std Edition Server. It uses the IResponse object to write
> directly to the HTTP stream.
>
> It had been running fine up until recently when it started dying, after
> it had been running for a while, returning the COM error code for Out
> of memory (OOM), which I then traced down the first Server.CreateObject
> call to my control in the ASP script. It seemed to happen around once
> or twice a week and then it started happening more frequently. I've
> checked my code and I'm not personally returning OOM in any of my code,
> so either IIS is returning this code at the point at which it attempts
> to create the object or the ATL runtime is returning the OOM code. The
> problem can be 'fixed' by running IISRESET, but I'm really struggling
> here to actually work out what to try and check next. I imagine that I
> will need stress testing to reproduce the problem, so assuming that I
> can reproduce with a stress test what can I do when it fails?
>
> We have implemented a temporary restart schedule to reduce the problem
> from happening, at since the last reset three hours ago the process
> looks like this:
>
> w3wp.exe
> Memory usage: 317,428K
> Page Faults: 2,422,617
> VM: 306,984K
>
> At first I thought it was leaking memory. The memory usage does creep
> up very slowly over time, but it doesn't appear to be leaking in MSVC
> debug mode. The question is: the object doesn't store anything in
> memory beyond page scope so should it be at this amount of memory usage
> three hours from starting? Does the system/IIS swell the memory given
> to the control over time if it is used a lot or does it look like it is
> leaking somewhere? Is it leaking because the amount of VM memory is
> very close to the amount allocated? Also, are the page faults very
> high for three hours?
>
> Many thanks
> Richard >> Stay informed about: IIS throws 'Out of memory' at Server.CreateObject in ASP |
|
| Back to top |
|
 |  |
|