473,401 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

Reclaiming asp.net memory

Interesting problem here.
Asp.net does not immediately give back its memory. How can i force it to
give back this memory? I thought of having a scheduled low priority thread
running in the background for my app, cleaning unused static objects and
possibly calling the garbage collector manually. I don't really like this
idea of mucking with the GC but would that be a feasible approach? I'm
worried because I see my memory climbing constantly especially after I have
pulled a dataset with about 150,000 rows of data. I'm careful to null out
the dataset, but that memory stays allocated to the aspnet worker process
and it refuses to give it back.

The app is running IIS5 so I don't really have the ability to manually
recycle the application pool without affecting everything running on the
box. I thought of using the machine config file to recycle the worker
process when memory passes a certain limit, but i reject this approach
because it flushes my static variables with the application restart and
logged in users get bumped off loosing their valuable data. I'd like the
aspnet worker process to give back a chunk of memory in a friendly way
without restarting the application.

What i wanted to do, but this kept failing was use the processModel in
web.config file to set session idle times, but that tag in the webconfig
file is not allowed, only in the machine config file

Any ideas? Anything i've missed?
Nov 15 '05 #1
1 1414
Anybody? Microsoft? Still waiting...
"Alvin Bruney" <vapordan_spam_me_not@hotmail_no_spamhotmail.com > wrote in
message news:em**************@TK2MSFTNGP09.phx.gbl...
Interesting problem here.
Asp.net does not immediately give back its memory. How can i force it to
give back this memory? I thought of having a scheduled low priority thread
running in the background for my app, cleaning unused static objects and
possibly calling the garbage collector manually. I don't really like this
idea of mucking with the GC but would that be a feasible approach? I'm
worried because I see my memory climbing constantly especially after I have pulled a dataset with about 150,000 rows of data. I'm careful to null out
the dataset, but that memory stays allocated to the aspnet worker process
and it refuses to give it back.

The app is running IIS5 so I don't really have the ability to manually
recycle the application pool without affecting everything running on the
box. I thought of using the machine config file to recycle the worker
process when memory passes a certain limit, but i reject this approach
because it flushes my static variables with the application restart and
logged in users get bumped off loosing their valuable data. I'd like the
aspnet worker process to give back a chunk of memory in a friendly way
without restarting the application.

What i wanted to do, but this kept failing was use the processModel in
web.config file to set session idle times, but that tag in the webconfig
file is not allowed, only in the machine config file

Any ideas? Anything i've missed?

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Thomas Rast | last post by:
Hello everyone My scenario is somewhat involved, so if you're in a hurry, here's an abstract: I have a daemon that needs about 80MB of RAM to build its internal data structures, but can pack...
0
by: Andreas Suurkuusk | last post by:
Hi, I just noticed your post in the "C# memory problem: no end for our problem?" thread. In the post you implied that I do not how the garbage collector works and that I mislead people. Since...
1
by: Mario | last post by:
If there is an associated memory cost for using session variables, can the memory used be reclaimed on an ASP page by setting the session variable to undefined or null? If on the same ASP page you...
4
by: Frank Esser | last post by:
I am using SQL 8 Personal edition with sp2 applied. I set the max server memory to 32MB and leave the min server memory at 0. When my application starts hitting the database hard the memory usage...
4
by: Franklin Lee | last post by:
Hi All, I use new to allocate some memory,even I doesn't use delete to release them. When my Application exit, OS will release them. Am I right? If I'm right, how about Thread especally on...
22
by: xixi | last post by:
hi, we are using db2 udb v8.1 for windows, i have changed the buffer pool size to accommadate better performance, say size 200000, if i have multiple connection to the same database from...
0
by: pigeonrandle | last post by:
Hello! Does anyone have any thoughts on the best way to go about reclaiming dormant connections? I see people using timers in examples, but their implementations vary from using a separate class...
5
by: kumarmdb2 | last post by:
Hi guys, For last few days we are getting out of private memory error. We have a development environment. We tried to figure out the problem but we believe that it might be related to the OS...
1
by: Jean-Paul Calderone | last post by:
On Tue, 22 Apr 2008 14:54:37 -0700 (PDT), yzghan@gmail.com wrote: The test doesn't demonstrate any leaks. It does demonstrate that memory usage can remain at or near peak memory usage even after...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.