473,545 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can you specify and determine the memory limit of an ASP.NET application

I have two questions:

(1)
How (if possible) can you, with ASP.NET (and with the IIS 5 included
with win2000) specify an maximum limit of the memory that a web
application may consume, as an absolute number of megabytes ???
( I am aware of the "memoryLimi t" attribute in the "processMod el"
element in the Web.config but that only specifies the maximum allowed
memory size, as a percentage of total system memory, and I don't want
a percentage but a number of megabytes)

(2)
How (if possible) can you, programmaticall y determine how many
megabytes of the memory that is currently available for *my asp.net
application* ???
Note that I am *not* interested in the totally amount of currently
unused memory of the entire machine, but only how much more memory
*my* web application may consume.
My reason for asking these questions is that I am running an asp.net
site with a web host with a win2003 server with IIS 6 and they have
assigned each customer/application a specific amount of memory as a
number of megabytes, but as far as I know this is a new feature of a
win2003/IIS6 application pool which I therefore can not use on my own
win2000 machine, or is there some way of specifying a memory limit
with asp.net and win2000 ?

I myself only have a win2000 machine, which I use for developing/
testing my site locally and I would like to try the web application
locally until I have made sure that it does not use more memory than
the upper limit at the web host, because when it consumes that much
memory it seems to make the entire web app totally unavailable even
including all the static html pages.

Regarding my second question, I am running some threads in the
background which are triggered when users accecces certatin pages
(the purpose of these threads is to do some quite demanding stuff that
might otherwise make the accesses to asp pages slow).
However, from these threads I would like to check how much memory is
available for *my* application so I can exit from the thread if I am
running out of memory, instead of keep consuming memory until the
entire web application becomes unavailable.

/ Tomas

Nov 18 '05 #1
0 1847

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

Similar topics

1
5498
by: 1944USA | last post by:
I have a C# application written as a Windows Service. It spawns a number of threads, each thread has very large memory intensive processes running on it. I can keep adding threads as long as the "committed byte" utilization of the server stays below 2.5 gigs As soon as we go over that amount we receive "System.OutOfMemoryException"...
7
4958
by: Jon Trickey | last post by:
We migrated to 8.1 from 7.2 this weekend. Everything ran ok over the weekend, but we have a light user load then (about 200 users.) Today when we had close to 600 users connecting and running applications, the db2syscs.exe process started gobbling up memory until it hit about 1.7 gigs (which seems to be the limit from what I've read) then it...
21
3557
by: Joakim Hove | last post by:
Hello, I have implemented a small library with a function a datatype to manage temporary storage, and handle out correctly casted storage. The function to get a double pointer is for instance: double * work_get_double(work_type *work, size_t size) {} Now, if the work area is not sufficiently large, the function fails,
10
3784
by: VM | last post by:
How can I limit the use of the PC's virtual memory? I'm running a process that basically takes a txt file and loads it to a datatable. The problem is that the file is over 400,000 lines long (77 MB) and after a while I get the Windows message saying that the virtual memory's getting really low. Plus the machine gets really sluggish (with...
6
3015
by: Stan | last post by:
There was a number of postings about aspnet_wp worker process taking too much memory and eventually choking the webserver. One issue is still not clear to me - how can I narrow it down to an application that is a culprit? Suppose, there are three applications on the webserver and each of them uses db connections and caching. I have not...
4
7820
by: AN | last post by:
Greetings, We make an ASP.NET web application and we host it for our customers. We have provisioned hardware and hope to be able to service around 200 customers on this hardware. The web servers are in a stateless farm and have 2 GB of RAM. We are using ASP.NET 1.1 when using a dedicated application pool for each virtual directory. Each...
6
12644
by: Yahya | last post by:
Dear Sirs, I have developed a VB .Net windows application, but unfortunately when I this application tries to use more than 2GB memory it fails although there is available 4GB of memory on the machine. How may I allocate more virtual memory to be used by the application or extend this limit? Regards, Yahya
1
1593
by: Johnny Granberg | last post by:
Im trying to create a application in vb.net that handles images, these images can be very large and i usualy get OutOfMemory error when i get to about 800Mb of memory usage... The strange thing is that the box has 4gb of memory and the /3gb switch in the windows starup parameters... Apparently tho the application needs to be aware of the...
158
6021
by: jty0734 | last post by:
i don't know what input size of string is. so i can't gets inputsize before malloc function. i want determine the size of malloc without get inputsize in advance. how to deal with it?
0
7484
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7675
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7928
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7775
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
4963
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3470
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3451
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1902
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1030
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.