Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > AJAX ScriptManager Memory Leak

Reply
Thread Tools

AJAX ScriptManager Memory Leak

 
 
=?Utf-8?B?Tmlrb2xheSBFdnNlZXY=?=
Guest
Posts: n/a
 
      07-03-2007
Hi!

I know this topic has been discussed a long way, but I haven't found any
apparent solution (maybe I shouldn't be looking for a one ) I have a very
simple application with one page and with just ScriptManager object in it.
Every time I refresh the page the memory usage goes up. I have AJAX
extenstions 1.0 installed and IE7 on winxp. Is this IE or AJAX problem, and
how did you guys cope with this problem?

Please reply asap... i am in emergency

Thanks
 
Reply With Quote
 
 
 
 
Cowboy \(Gregory A. Beamer\)
Guest
Posts: n/a
 
      07-03-2007
I would not panic about memory usage until you know what is happening. By
default, .NET uses memory until it needs it. While this seems like an issue,
it is actually more efficient to leave memory in use than to clear it
immediately after use. As long as the application does not exhibit issues
under load, I would not panic (consider downloading something like the Web
Application Stress Tool - free from MS).

Memory is eventually "garbage collected", but it waits until it needs
memory.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************
"Nikolay Evseev"
<Nikolay.EvseevD0nTiNcLuDeThIs@REMOVETHISCalorGas. ANDTHISie> wrote in
message news:(E-Mail Removed)...
> Hi!
>
> I know this topic has been discussed a long way, but I haven't found any
> apparent solution (maybe I shouldn't be looking for a one ) I have a
> very
> simple application with one page and with just ScriptManager object in it.
> Every time I refresh the page the memory usage goes up. I have AJAX
> extenstions 1.0 installed and IE7 on winxp. Is this IE or AJAX problem,
> and
> how did you guys cope with this problem?
>
> Please reply asap... i am in emergency
>
> Thanks



 
Reply With Quote
 
 
 
 
=?Utf-8?B?Tmlrb2xheSBFdnNlZXY=?=
Guest
Posts: n/a
 
      07-03-2007
The problem is with my client who is requiring this issue to be fixed asap.
And it does prove to be an issue since the end user may have the same page
opened for days without closing it. All users connect to this application via
citrix (just the way they work, I can't force them to change) and therefore
the memory usage issue becomes crucial.
I've read on some forums that this is due to AJAX not disposing off it's own
objects properly.
But why this works fine on some machines and doesn't on the others. Is it to
do with the fact that older machines have traces of previous ajax versions?

"Cowboy (Gregory A. Beamer)" wrote:

> I would not panic about memory usage until you know what is happening. By
> default, .NET uses memory until it needs it. While this seems like an issue,
> it is actually more efficient to leave memory in use than to clear it
> immediately after use. As long as the application does not exhibit issues
> under load, I would not panic (consider downloading something like the Web
> Application Stress Tool - free from MS).
>
> Memory is eventually "garbage collected", but it waits until it needs
> memory.
>
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
> http://gregorybeamer.spaces.live.com
> Co-author: Microsoft Expression Web Bible (upcoming)
>
> ************************************************
> Think outside the box!
> ************************************************
> "Nikolay Evseev"
> <Nikolay.EvseevD0nTiNcLuDeThIs@REMOVETHISCalorGas. ANDTHISie> wrote in
> message news:(E-Mail Removed)...
> > Hi!
> >
> > I know this topic has been discussed a long way, but I haven't found any
> > apparent solution (maybe I shouldn't be looking for a one ) I have a
> > very
> > simple application with one page and with just ScriptManager object in it.
> > Every time I refresh the page the memory usage goes up. I have AJAX
> > extenstions 1.0 installed and IE7 on winxp. Is this IE or AJAX problem,
> > and
> > how did you guys cope with this problem?
> >
> > Please reply asap... i am in emergency
> >
> > Thanks

>
>
>

 
Reply With Quote
 
George Ter-Saakov
Guest
Posts: n/a
 
      07-03-2007
He was talking about JavaScript memory leaks not server side.

George.

"Cowboy (Gregory A. Beamer)" <(E-Mail Removed)> wrote in
message news:%23%(E-Mail Removed)...
>I would not panic about memory usage until you know what is happening. By
>default, .NET uses memory until it needs it. While this seems like an
>issue, it is actually more efficient to leave memory in use than to clear
>it immediately after use. As long as the application does not exhibit
>issues under load, I would not panic (consider downloading something like
>the Web Application Stress Tool - free from MS).
>
> Memory is eventually "garbage collected", but it waits until it needs
> memory.
>
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
> http://gregorybeamer.spaces.live.com
> Co-author: Microsoft Expression Web Bible (upcoming)
>
> ************************************************
> Think outside the box!
> ************************************************
> "Nikolay Evseev"
> <Nikolay.EvseevD0nTiNcLuDeThIs@REMOVETHISCalorGas. ANDTHISie> wrote in
> message news:(E-Mail Removed)...
>> Hi!
>>
>> I know this topic has been discussed a long way, but I haven't found any
>> apparent solution (maybe I shouldn't be looking for a one ) I have a
>> very
>> simple application with one page and with just ScriptManager object in
>> it.
>> Every time I refresh the page the memory usage goes up. I have AJAX
>> extenstions 1.0 installed and IE7 on winxp. Is this IE or AJAX problem,
>> and
>> how did you guys cope with this problem?
>>
>> Please reply asap... i am in emergency
>>
>> Thanks

>
>



 
Reply With Quote
 
Chad Scharf
Guest
Posts: n/a
 
      07-03-2007
From the Mix 07 event I asked the same question of a few of the speakers and
got a few simple answers of the client object model, especially of IE and
memory usage and the disposable model through JavaScript.

1. Ensure you are not using ANY inline JavaScript on your page, this can
prevent execution of any AJAX related Dispose methods. This is of course
unless it can dispose of itself.

2. Ensure any other .js or other script files you register on the page are
done within the ScriptManager and not in the head tag. This is important so
the ScriptManager can control how to manage the client side memory and
loading those scripts and in what order they should be loaded in relation
with the AJAX client side libraries.

3. Only use the ScriptManager on a page if you really need it. You said you
only have a ScriptManager on that page, why? Do you have an UpdatePanel
control, are you using the AJAX client side libraries for your own scripts,
are you using the Animation libraries? If you are using those, are you
implementing the disposable pattern properly?

"Nikolay Evseev"
<Nikolay.EvseevD0nTiNcLuDeThIs@REMOVETHISCalorGas. ANDTHISie> wrote in
message news:(E-Mail Removed)...
> Hi!
>
> I know this topic has been discussed a long way, but I haven't found any
> apparent solution (maybe I shouldn't be looking for a one ) I have a
> very
> simple application with one page and with just ScriptManager object in it.
> Every time I refresh the page the memory usage goes up. I have AJAX
> extenstions 1.0 installed and IE7 on winxp. Is this IE or AJAX problem,
> and
> how did you guys cope with this problem?
>
> Please reply asap... i am in emergency
>
> Thanks



 
Reply With Quote
 
=?Utf-8?B?Tmlrb2xheSBFdnNlZXY=?=
Guest
Posts: n/a
 
      07-03-2007
The original problem occurs in the real world application with at least an
updatepanel on the page. I am talking here about a simple sample application
which everyone here can easily reproduce. One thing is becoming obvious for
me - memory leaks occurs on those client machines where a previous version of
ajax/atlas was used. Freshly installed pcs don't seem to have the same
problem.

Any more thoughts? Anyone knows how to get rid of traces of previous ajax
versions on client machines?

Maybe there is a possibility of writing some onunload javascript handler
where a manual script will null all unused references?

Regards,
Nikolay

"Chad Scharf" wrote:

> From the Mix 07 event I asked the same question of a few of the speakers and
> got a few simple answers of the client object model, especially of IE and
> memory usage and the disposable model through JavaScript.
>
> 1. Ensure you are not using ANY inline JavaScript on your page, this can
> prevent execution of any AJAX related Dispose methods. This is of course
> unless it can dispose of itself.
>
> 2. Ensure any other .js or other script files you register on the page are
> done within the ScriptManager and not in the head tag. This is important so
> the ScriptManager can control how to manage the client side memory and
> loading those scripts and in what order they should be loaded in relation
> with the AJAX client side libraries.
>
> 3. Only use the ScriptManager on a page if you really need it. You said you
> only have a ScriptManager on that page, why? Do you have an UpdatePanel
> control, are you using the AJAX client side libraries for your own scripts,
> are you using the Animation libraries? If you are using those, are you
> implementing the disposable pattern properly?
>
> "Nikolay Evseev"
> <Nikolay.EvseevD0nTiNcLuDeThIs@REMOVETHISCalorGas. ANDTHISie> wrote in
> message news:(E-Mail Removed)...
> > Hi!
> >
> > I know this topic has been discussed a long way, but I haven't found any
> > apparent solution (maybe I shouldn't be looking for a one ) I have a
> > very
> > simple application with one page and with just ScriptManager object in it.
> > Every time I refresh the page the memory usage goes up. I have AJAX
> > extenstions 1.0 installed and IE7 on winxp. Is this IE or AJAX problem,
> > and
> > how did you guys cope with this problem?
> >
> > Please reply asap... i am in emergency
> >
> > Thanks

>
>
>

 
Reply With Quote
 
Chad Scharf
Guest
Posts: n/a
 
      07-03-2007
As far as I know there is no real way to do this other than requesting that
the client completely nuke thier temporary internet file store/cache. The
client libraries are simply javascript files and are not really in the .NET
framework on the client machine (until Silverlight becomes more widely
adopted that is). The browser hooks that the script uses cached by the
browser similar to any sites referenced scripts.

Perhaps you can have them try this, unless you already have which I imagine
you have. Perhaps someone else has another idea. Sorry, I misunderstood the
underlying probable cause.

-- Chad

"Nikolay Evseev"
<Nikolay.EvseevD0nTiNcLuDeThIs@REMOVETHISCalorGas. ANDTHISie> wrote in
message news:(E-Mail Removed)...
> The original problem occurs in the real world application with at least an
> updatepanel on the page. I am talking here about a simple sample
> application
> which everyone here can easily reproduce. One thing is becoming obvious
> for
> me - memory leaks occurs on those client machines where a previous version
> of
> ajax/atlas was used. Freshly installed pcs don't seem to have the same
> problem.
>
> Any more thoughts? Anyone knows how to get rid of traces of previous ajax
> versions on client machines?
>
> Maybe there is a possibility of writing some onunload javascript handler
> where a manual script will null all unused references?
>
> Regards,
> Nikolay
>
> "Chad Scharf" wrote:
>
>> From the Mix 07 event I asked the same question of a few of the speakers
>> and
>> got a few simple answers of the client object model, especially of IE and
>> memory usage and the disposable model through JavaScript.
>>
>> 1. Ensure you are not using ANY inline JavaScript on your page, this can
>> prevent execution of any AJAX related Dispose methods. This is of course
>> unless it can dispose of itself.
>>
>> 2. Ensure any other .js or other script files you register on the page
>> are
>> done within the ScriptManager and not in the head tag. This is important
>> so
>> the ScriptManager can control how to manage the client side memory and
>> loading those scripts and in what order they should be loaded in relation
>> with the AJAX client side libraries.
>>
>> 3. Only use the ScriptManager on a page if you really need it. You said
>> you
>> only have a ScriptManager on that page, why? Do you have an UpdatePanel
>> control, are you using the AJAX client side libraries for your own
>> scripts,
>> are you using the Animation libraries? If you are using those, are you
>> implementing the disposable pattern properly?
>>
>> "Nikolay Evseev"
>> <Nikolay.EvseevD0nTiNcLuDeThIs@REMOVETHISCalorGas. ANDTHISie> wrote in
>> message news:(E-Mail Removed)...
>> > Hi!
>> >
>> > I know this topic has been discussed a long way, but I haven't found
>> > any
>> > apparent solution (maybe I shouldn't be looking for a one ) I have a
>> > very
>> > simple application with one page and with just ScriptManager object in
>> > it.
>> > Every time I refresh the page the memory usage goes up. I have AJAX
>> > extenstions 1.0 installed and IE7 on winxp. Is this IE or AJAX problem,
>> > and
>> > how did you guys cope with this problem?
>> >
>> > Please reply asap... i am in emergency
>> >
>> > Thanks

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?Tmlrb2xheSBFdnNlZXY=?=
Guest
Posts: n/a
 
      07-03-2007
I have tried deleting all temporary files myself on my machine, but anyway no
luck.

Microsoft guys! Do you want to contribute to this chain? I am sure you've
been asked about this problem not once?

Thanks in advance,
Nikolay

"Chad Scharf" wrote:

> As far as I know there is no real way to do this other than requesting that
> the client completely nuke thier temporary internet file store/cache. The
> client libraries are simply javascript files and are not really in the .NET
> framework on the client machine (until Silverlight becomes more widely
> adopted that is). The browser hooks that the script uses cached by the
> browser similar to any sites referenced scripts.
>
> Perhaps you can have them try this, unless you already have which I imagine
> you have. Perhaps someone else has another idea. Sorry, I misunderstood the
> underlying probable cause.
>
> -- Chad
>
> "Nikolay Evseev"
> <Nikolay.EvseevD0nTiNcLuDeThIs@REMOVETHISCalorGas. ANDTHISie> wrote in
> message news:(E-Mail Removed)...
> > The original problem occurs in the real world application with at least an
> > updatepanel on the page. I am talking here about a simple sample
> > application
> > which everyone here can easily reproduce. One thing is becoming obvious
> > for
> > me - memory leaks occurs on those client machines where a previous version
> > of
> > ajax/atlas was used. Freshly installed pcs don't seem to have the same
> > problem.
> >
> > Any more thoughts? Anyone knows how to get rid of traces of previous ajax
> > versions on client machines?
> >
> > Maybe there is a possibility of writing some onunload javascript handler
> > where a manual script will null all unused references?
> >
> > Regards,
> > Nikolay
> >
> > "Chad Scharf" wrote:
> >
> >> From the Mix 07 event I asked the same question of a few of the speakers
> >> and
> >> got a few simple answers of the client object model, especially of IE and
> >> memory usage and the disposable model through JavaScript.
> >>
> >> 1. Ensure you are not using ANY inline JavaScript on your page, this can
> >> prevent execution of any AJAX related Dispose methods. This is of course
> >> unless it can dispose of itself.
> >>
> >> 2. Ensure any other .js or other script files you register on the page
> >> are
> >> done within the ScriptManager and not in the head tag. This is important
> >> so
> >> the ScriptManager can control how to manage the client side memory and
> >> loading those scripts and in what order they should be loaded in relation
> >> with the AJAX client side libraries.
> >>
> >> 3. Only use the ScriptManager on a page if you really need it. You said
> >> you
> >> only have a ScriptManager on that page, why? Do you have an UpdatePanel
> >> control, are you using the AJAX client side libraries for your own
> >> scripts,
> >> are you using the Animation libraries? If you are using those, are you
> >> implementing the disposable pattern properly?
> >>
> >> "Nikolay Evseev"
> >> <Nikolay.EvseevD0nTiNcLuDeThIs@REMOVETHISCalorGas. ANDTHISie> wrote in
> >> message news:(E-Mail Removed)...
> >> > Hi!
> >> >
> >> > I know this topic has been discussed a long way, but I haven't found
> >> > any
> >> > apparent solution (maybe I shouldn't be looking for a one ) I have a
> >> > very
> >> > simple application with one page and with just ScriptManager object in
> >> > it.
> >> > Every time I refresh the page the memory usage goes up. I have AJAX
> >> > extenstions 1.0 installed and IE7 on winxp. Is this IE or AJAX problem,
> >> > and
> >> > how did you guys cope with this problem?
> >> >
> >> > Please reply asap... i am in emergency
> >> >
> >> > Thanks
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
marss
Guest
Posts: n/a
 
      07-04-2007

Nikolay Evseev wrote:
> Hi!
>
> I know this topic has been discussed a long way, but I haven't found any
> apparent solution (maybe I shouldn't be looking for a one ) I have a very
> simple application with one page and with just ScriptManager object in it.
> Every time I refresh the page the memory usage goes up. I have AJAX
> extenstions 1.0 installed and IE7 on winxp. Is this IE or AJAX problem, and
> how did you guys cope with this problem?
>
> Please reply asap... i am in emergency
>
> Thanks


Hi,
Try to use a few small update panels instead of single large one if
your program logic allows it. It can slightly soften problem.

This is not particular AJAX problem, it is common IE problem. It is
not designed to work without refreshing page for days.
http://msdn2.microsoft.com/en-us/library/bb250448.aspx

Regards, Mykola
http://marss.co.ua

 
Reply With Quote
 
=?Utf-8?B?Tmlrb2xheSBFdnNlZXY=?=
Guest
Posts: n/a
 
      07-04-2007
The page that the client is having the problem with contains only one
updatepanel with a gridview in it.

One more thing - when you minimize the IE window, memory goes back to normal

"marss" wrote:

>
> Nikolay Evseev wrote:
> > Hi!
> >
> > I know this topic has been discussed a long way, but I haven't found any
> > apparent solution (maybe I shouldn't be looking for a one ) I have a very
> > simple application with one page and with just ScriptManager object in it.
> > Every time I refresh the page the memory usage goes up. I have AJAX
> > extenstions 1.0 installed and IE7 on winxp. Is this IE or AJAX problem, and
> > how did you guys cope with this problem?
> >
> > Please reply asap... i am in emergency
> >
> > Thanks

>
> Hi,
> Try to use a few small update panels instead of single large one if
> your program logic allows it. It can slightly soften problem.
>
> This is not particular AJAX problem, it is common IE problem. It is
> not designed to work without refreshing page for days.
> http://msdn2.microsoft.com/en-us/library/bb250448.aspx
>
> Regards, Mykola
> http://marss.co.ua
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
asp ScriptManager vs. AjaxToolkit ScriptManager asp.net ajax ASP .Net 2 12-21-2009 03:37 PM
AJAX in ASP.Net ScriptManager error Steve Kershaw ASP .Net 2 04-25-2007 09:42 PM
Ajax - Master Pages - ScriptManager - Web User Controls =?Utf-8?B?TGFycnkgRXBu?= ASP .Net 1 02-26-2007 02:31 AM
Installing Ajax RC1 - ---- Element 'ScriptManager' is not a known element Elmo Watson ASP .Net 1 01-19-2007 12:01 AM



Advertisments