Learn how to a build a cloud-first strategyRegister Now


out of memory

Posted on 2011-10-22
Medium Priority
Last Modified: 2012-05-12
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:


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

Expert Comment

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

Expert Comment

ID: 37014299
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

ID: 37019080
in addition to the above...do a garbage collection and destroy object, varaibles...
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 37045394
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

CodeCruiser earned 2000 total points
ID: 37045590
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

ID: 37045623
Thanks for the help.  Very informative.
LVL 83

Expert Comment

ID: 37046133
Glad to help :-)

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Loops Section Overview
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
Suggested Courses

810 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