Go Back   Velocity Reviews > Newsgroups > ASP Net
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply

ASP Net - AJAX ScriptManager Memory Leak

 
Thread Tools Search this Thread
Old 07-03-2007, 02:28 PM   #1
=?Utf-8?B?Tmlrb2xheSBFdnNlZXY=?=
 
Posts: n/a
Default AJAX ScriptManager Memory Leak

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
Old 07-03-2007, 04:03 PM   #2
Cowboy \(Gregory A. Beamer\)
 
Posts: n/a
Default Re: AJAX ScriptManager Memory Leak

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:325BB9FF-9F51-459F-BAF3-...
> 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
Old 07-03-2007, 04:16 PM   #3
=?Utf-8?B?Tmlrb2xheSBFdnNlZXY=?=
 
Posts: n/a
Default Re: AJAX ScriptManager Memory Leak

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:325BB9FF-9F51-459F-BAF3-...
> > 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
Old 07-03-2007, 06:03 PM   #4
George Ter-Saakov
 
Posts: n/a
Default Re: AJAX ScriptManager Memory Leak

He was talking about JavaScript memory leaks not server side.

George.

"Cowboy (Gregory A. Beamer)" <> wrote in
message news:%23%...
>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:325BB9FF-9F51-459F-BAF3-...
>> 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
Old 07-03-2007, 08:06 PM   #5
Chad Scharf
 
Posts: n/a
Default Re: AJAX ScriptManager Memory Leak

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:325BB9FF-9F51-459F-BAF3-...
> 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
Old 07-03-2007, 09:26 PM   #6
=?Utf-8?B?Tmlrb2xheSBFdnNlZXY=?=
 
Posts: n/a
Default Re: AJAX ScriptManager Memory Leak

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:325BB9FF-9F51-459F-BAF3-...
> > 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
Old 07-03-2007, 09:45 PM   #7
Chad Scharf
 
Posts: n/a
Default Re: AJAX ScriptManager Memory Leak

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:C8DB7106-BF59-4A27-91BC-...
> 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:325BB9FF-9F51-459F-BAF3-...
>> > 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
Old 07-03-2007, 10:30 PM   #8
=?Utf-8?B?Tmlrb2xheSBFdnNlZXY=?=
 
Posts: n/a
Default Re: AJAX ScriptManager Memory Leak

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:C8DB7106-BF59-4A27-91BC-...
> > 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:325BB9FF-9F51-459F-BAF3-...
> >> > 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
Old 07-04-2007, 06:40 AM   #9
marss
 
Posts: n/a
Default Re: AJAX ScriptManager Memory Leak


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
Old 07-04-2007, 08:36 AM   #10
=?Utf-8?B?Tmlrb2xheSBFdnNlZXY=?=
 
Posts: n/a
Default Re: AJAX ScriptManager Memory Leak

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 Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
OCZ 6GB Triple-Channel 1333 MHz DDR3 Memory Kit Ian Front Page News 0 02-16-2009 12:27 PM
Dynamic Iframes Memory Leak In Internet Explorer cdmsenthil@gmail.com Software 0 03-28-2008 03:11 PM
memory upgrade -D- A+ Certification 1 02-03-2007 12:01 AM
Re: What memory to use? me A+ Certification 0 12-14-2004 02:33 AM
Re: Memory stick question Nildram A+ Certification 1 01-14-2004 01:41 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47