out of memory

Posted on 2011-10-22
Last Modified: 2012-05-12
I am using 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:


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 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.
Question by:rckrch
    LVL 2

    Expert Comment

    Run the web site from IIS. Set the recycling propertes in Application pool to use reserved memory size.
    LVL 83

    Expert Comment

    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.
    LVL 10

    Expert Comment

    in addition to the a garbage collection and destroy object, varaibles...

    Author Comment

    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.

    LVL 83

    Accepted Solution

    You would have more problem with 1 sec interval on production site because it will take more time to get response for each request and there may be more concurrent users. So i hope 30 sec interval should be fine. If you want, you can keep playing with the interval by reducing to 25, 20 and so on.

    Author Closing Comment

    Thanks for the help.  Very informative.
    LVL 83

    Expert Comment

    Glad to help :-)

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now