Link to home
Start Free TrialLog in
Avatar of rckrch
rckrchFlag for United States of America

asked on

out of memory

I am using asp.net and vb code behind to build a website with multiple update panels.  The purpose of this is the continually update charts in the panels at a frequency of 1 second intervals.  The code works fine until it runds for about 17 to 20 minutes.  At that point I get an out of memory message from the web page - 'out of memory at line 1301'.

I have tried clearing memory out of cache by using the following in page load:

Cache.Remove("WebForm5.aspx")
Cache.Remover("Repeater1")

I have tried the above cache removal code for each control and for the page in which I have the update panels.  They have no effect at all.

I have also tried setting the 'EnableEventValidation="False"'

Several questions:

1.  Is this asp.net code line 1301 or vb code behind?
2.  Is cache automatically loaded into memory even though I am not programmatically loading any into cache?
3.  Why does the Cache.Removal code have no effect?

What else can I try?

Can anyone help?

Thanks in advance.
Avatar of yatin_81
yatin_81

Run the web site from IIS. Set the recycling propertes in Application pool to use reserved memory size.
Avatar of Nasir Razzaq
I suspect the problem is 1 second interval. I dont think request goes to the server and comes back within a second. So you essentially create a long queue of AJAX calls and it brings the system down at some point. Try testing with a 5 second interval.
in addition to the above...do a garbage collection and destroy object, varaibles...
Avatar of rckrch

ASKER

yatin 81 - I don't have a 'reserved memory size' option in my Application pool.

CodeCruiser - setting the time interval to 30 seconds did the trick.  I have a lot of data feeding 3 charts and 3 gridviews on the same page and the I guess this was the interval that was needed to correct the situation.  I do suspect that when I start running the web site from IIS and the production application is installed on the server I won't have the problem to the same extent.

Correct?
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rckrch

ASKER

Thanks for the help.  Very informative.
Glad to help :-)