The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> System Administration
> IIS
|
Memory leak, caching, or maybe something else?
Discuss Memory leak, caching, or maybe something else? in the IIS forum on Dev Shed. Memory leak, caching, or maybe something else? IIS forum discussing Microsoft's Internet Information Server including its configuration, optimization and other related topics. IIS is the most popular web server for the Windows platform.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

November 16th, 2010, 10:42 AM
|
|
Registered User
|
|
Join Date: Nov 2010
Posts: 4
Time spent in forums: 34 m 59 sec
Reputation Power: 0
|
|
|
Memory leak, caching, or maybe something else?
Hi,
I am trying to figure out if my application has a memory leak in it. I use a library called PdfSharp, which I then have a bunch of my own code sitting on top of, to allow me to more easily use the library. I think PdfSharp may be the culprit, but im not sure.
When I run a blank .aspx page sitting in its own app pool which has been freshly recycled, each time i refresh the page, the memory usage in "perfmon" goes up by about 100kb - its not a consistent amount, but its only quite small each time.
I have turned the IIS cache off by adding a value to the registry key:
HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/INetInfo/Parameters
where the key/value is ObjectCacheTTL/0 which, from what i read should stop caching of any form in IIS?
I would them assume that each time I refresh the page, the memory usage would stay the same as nothing has been cached and the DLL's are already loaded into memory?
So why is the Private Bytes increasing each time I refresh?
The reason I found this weird behaviour out was becuase I was trying to see if the library when used on its own (rather than with any of my "framework" style code plugging into the library) was causing the Private Bytes (i.e. unmanaged memory leak) on the w3wp.exe/app pool to keep going up, which it is. But when i commented out all my code, so it was just a blank .aspx page and I still get similar behaviour when i run (albeit on a smaller scale) then maybe its not a memory leak?
Im only a bit of an IIS novice at the moment and am pretty stumpted with this, but hopefully someone can help me as my current workaround to the PdfSharp "memory leak" is recycling the app pool every 10 requests, which for the time being seems to be holding up. but a more solid solution would be better as we have a lot of users....
I am running the code locally on a Vista machine running IIS6 if its any help.
Thanks,
Mike
|

November 16th, 2010, 01:46 PM
|
|
|
|
What version of IIS? What version of NET?
__________________
======
Doug G
======
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi
|

November 17th, 2010, 03:19 AM
|
|
Registered User
|
|
Join Date: Nov 2010
Posts: 4
Time spent in forums: 34 m 59 sec
Reputation Power: 0
|
|
|
Hi,
Its IIS6 and .net 2.0
Thanks,
Mike
|

November 17th, 2010, 02:27 PM
|
|
|
|
My guess is something in the web page coding if there's a problem. As another guess, you may be seeing normal perfmon results where the allocated memory doesn't get released back to the OS immediately, kind of like how sql server hogs memory and doesn't release it back to the OS until some limit is reached.
I'm not familiar with any registry tweaks and IIS, but if you've done much manual registry editing you may have introduced some subtle problem. In my environment I've never found the need to visit registry keys for IIS.
|

November 18th, 2010, 03:25 AM
|
|
Registered User
|
|
Join Date: Nov 2010
Posts: 4
Time spent in forums: 34 m 59 sec
Reputation Power: 0
|
|
|
Hi,
I only added the reg key once this had already started happening, to try and stop it. As for the code, its all commented out, so i cant see that being a problem.
Maybe it is like SQL server....
Thanks,
Mike
|

November 18th, 2010, 02:18 PM
|
|
|
|
Sorry I can't help, I'm not familiar enough with the innards of IIS or IIS low-level debugging.
I do seem to recall reading something in IIS5 days saying that IIS internal cache doesn't re-use pages between calls but will open a new cache buffer for each page call. Just guessing, but this may be what you're seeing (although I don't know if this info is even correct).
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|