SamJolly
asked on
Out of memory problem for ASP.NET/IIS6.... How to evaluate how much memory is available to web instance?
Hi,
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.
Thoughts???
Thanks,
Sam
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.
Thoughts???
Thanks,
Sam
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Folks.
Thanks for this.
So there is no way for the asp.net code to access some memory variable value?? One has to rely on 3rd party tools such as ANTS profiler which I have and investigating to sort out the memory leak in the code?
Sam
Thanks for this.
So there is no way for the asp.net code to access some memory variable value?? One has to rely on 3rd party tools such as ANTS profiler which I have and investigating to sort out the memory leak in the code?
Sam
ASKER
Alfred,
I have a specific App Pool for my application/ IIS web instance
Sam
I have a specific App Pool for my application/ IIS web instance
Sam
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I don't think you can call profiling API's from managed code, you can only attach a profiler to a running managed process.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Folks,
Thanks for the comments and tips. However I still do not know how to get the available memory value for the host web iis instance. If I can get this then I might find that it is not my code, but the share hosting environment which is not providing enough RAM. I really could do with getting this figure.
I am encountering quite a number of errors in production use, particularly "Invalid Viewstate" although the users are not complaining. Some of them may be behind the scences since we log all raised exceptions.
Thanks again,
Sam
Thanks for the comments and tips. However I still do not know how to get the available memory value for the host web iis instance. If I can get this then I might find that it is not my code, but the share hosting environment which is not providing enough RAM. I really could do with getting this figure.
I am encountering quite a number of errors in production use, particularly "Invalid Viewstate" although the users are not complaining. Some of them may be behind the scences since we log all raised exceptions.
Thanks again,
Sam
ASKER
Sorry about leaving this. No I do want to allocate points since I appreciate the help.
Sam
Sam
ASKER
How do I shre the allocation? Cannot see the button?
Sam
Sam
@cs97jjm3,
Please read Sam's comments ID 32269964 and 32270136. Thanks.
Regards,
Alfred1
Please read Sam's comments ID 32269964 and 32270136. Thanks.
Regards,
Alfred1
ASKER
thx
http://support.microsoft.com/kb/911716
To monitor the app memory usage you can use Ants profiler - is best one I know.