IIS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationIIS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 16th, 2010, 10:42 AM
mikesowerbutts mikesowerbutts is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2010
Posts: 4 mikesowerbutts User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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

Reply With Quote
  #2  
Old November 16th, 2010, 01:46 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,239 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 15 h 20 m 7 sec
Reputation Power: 4445
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

Reply With Quote
  #3  
Old November 17th, 2010, 03:19 AM
mikesowerbutts mikesowerbutts is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2010
Posts: 4 mikesowerbutts User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 34 m 59 sec
Reputation Power: 0
Hi,

Its IIS6 and .net 2.0

Thanks,

Mike

Reply With Quote
  #4  
Old November 17th, 2010, 02:27 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,239 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 15 h 20 m 7 sec
Reputation Power: 4445
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.

Reply With Quote
  #5  
Old November 18th, 2010, 03:25 AM
mikesowerbutts mikesowerbutts is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2010
Posts: 4 mikesowerbutts User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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

Reply With Quote
  #6  
Old November 18th, 2010, 02:18 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 19th Plane (14000 - 14499 posts)
 
Join Date: Jun 2003
Posts: 14,239 Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level)Doug G User rank is General 52nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 4 Weeks 15 h 20 m 7 sec
Reputation Power: 4445
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).

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationIIS > Memory leak, caching, or maybe something else?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap