Monday, March 26, 2012

Ajax timercontrol - ie6 freezes with high cpu over long period of time

Hi,

I'm using Ajax for ASP.NET (2.0) on a project. In this project I use the ajax timer control to refresh contents of an update panel.
The panel refresh happens every minute. (the content of the panel consists of information that is pulled out of a database).

All works fine so far, except that I noticed to have big issue with my pages. The page with the timer & updatepanel is opened continously for literally days. (so we could speak of long user sessions), and each minute it is refreshing.

When loaded in ie6 (I didn't try another browser, but ie6 is still the standard in my company, so no other choices), after a while, I start noticing a constant CPU load on the iexplore.exe process, and I don't mean during refresh, just while the page is static & not updating/refreshing. It starts of at 0%, then after half an hour, it's at 1%, a bit later 2% and so on...
After lots of hours (like one working day), I end up with an internet explorer session that is continously using as much CPU as it can have. And most of the time, ie6 just got frozen and isn't doing anything.

This is so bad. I made sure I stopped the timer before doing the updating & then restart the timer to avoid any problems in this area, but it still exists.

Did anyone notice this as well? Is there some kind of cure for it? Or am I doing anything wrong here?

Thanks!!

Here's a related post:http://forums.asp.net/p/1009453/1367209.aspx

-Damien


As suggested in that topic I have moved the ajax timer control & the progress bar out of the update panel, I have set the update panel trigger to the timer tick event.

I also disable the timer before refreshing & enable it again afterwards:

protected void tmrRefresh_Tick(object sender, EventArgs e)
{
tmrRefresh.Enabled =false;
((BasePage)Page).Refresh();
tmrRefresh.Enabled =true;
}

The timer interval is set at 1 minute

still I have this increasing CPU load (really little, but it exists) over time, like + 1% every hour (just when the page is static).

What is going on here? Any help?

EDIT: I'd like to add that all things mentioned in the topic you posted belong to the atlas extensions. I'm not using those, I'm using the Ajax 1.0 extensions...


Atlas was the pre-release name of ASP.NET AJAX 1.0; much of the content still holds true...

Your problem sounds like this issue is a leak with IE6 and JavaScript; did you try with IE7?

-Damien


I know that Atlas preceded Ajax extensions, I only wanted to make sure what I was using. I can imagine some stuff was changed from Atlas to Ajax...
As told in my initial post, ie6 is still the standard browser in our company, so trying ie7 will not help me.

But... I created a very simple ajax enabled web application today with just a timer that refreshes a text label every 5 seconds. The label held the current date & time.
I let it run for half a day and no constant CPU load whatshowever.

Does this mean that the increasing CPU stuff is hiding somewhere else, in the refresh procedure of my project?
If so, then why does a client gets a constant CPU load even when the page is not refreshing.
I thought the only thing that would happen on client side was waiting for the next timer tick... or am I wrong?


I don't know who accepted Damien's post as answer, but this problem is still open and I have yet to find a solution...Surprise

No comments:

Post a Comment