I have an ASP.NET application on a shared IIS6 server with 4GB RAM. There are quite a lot of other sites on this server, at least 20. There is no memory capping setup for any site, it is all default IIS6 setup. I am getting "out of memory exception" errors. We have setup Application Pool Recycling every 24hours. Now I realise that any potential memory leak should be plugged. However I am concerned that the amount of memory available to this application could decrease to problematic levels due to high activity of other sites. Therefore I want to put in some code that extracts the value of memory that is available to my Web site when it crashes, or memory available to my application pool.
So it may be 1GB is free and available off the server to my app pool however this might go down to say 200mb which would make "out of memory" errors more likely.