New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leaks in IE/Chrome when use SignalR longPolling #2953

Closed
Xiaohongt opened this Issue Mar 27, 2014 · 10 comments

Comments

Projects
None yet
5 participants
@Xiaohongt
Contributor

Xiaohongt commented Mar 27, 2014

I have run sample message loops which does both send and receive messages for about 12 hours on IE and Chrome using longPolling transport, the results for process memory data Working Set –Private show that there are memory leaks.

BTW, the run for directly using XMLHttpRequest to send message /post and poll/get to signalr ( just like longPolling ) in infinite loops but without SignalR js run for over 10 hours on Chrome, doesn’t show memory leaks.

@Xiaohongt Xiaohongt added the bug label Mar 27, 2014

@pfletcher

This comment has been minimized.

pfletcher commented Apr 3, 2014

More issues from the reporting user:

Hi Patrick, Thanks again for your timely response.

To reiterate, I don't believe that the memory leak is limited to just Chrome/LongPolling.

My observations were that it also occurred for all the following combinations as well

IE 10/'foreverFrame' and IE 10/'longPolling' and

FireFox 27/'serverSentEvents' and FireFox 27/'longPolling'

I have numerous Memory Resource Monitor screen shots to support my claims should you need them.

  • Michael
@pfletcher

This comment has been minimized.

pfletcher commented Apr 8, 2014

Continued info:
I had also observed from the Resource Monitor Memory page that in addition to the
Browser process memory leak that the associated 'w3wp.exe' process was also leaking
memory.
Here is a summary of the steps that I had taken to isolate this issue.

  1. I deployed the SignalR.StockTicker sample application to the 'ASP.NET v4.0'
    Application Pool that comes out of the box with IIS and I ensured that it was the
    only application running in that pool.
  2. Under the 'Advanced Settings...' option for that Application Pool I changed the
    following two settings from their default values, so as to ensure that the process
    would NOT get recycled
    'Idle Time-out (minutes)' = 0
    'Regular Time Interval (minutes)' = 0
  3. And then I let the application run for several days and the Memory usage just
    kept on growing.
    Let me know if I can be of any assistance in testing any potential solutions that
    may come out of this bug fix.
    Thanks again. Regards - Michael
@mosullivan3

This comment has been minimized.

mosullivan3 commented Apr 14, 2014

Hello, is there some way of finding out how far down in the list this bug item is ? Unfortunately I'm running out of time and options and I may have to abandon using SignalR as part of my solution, if
there hasn't been any sign of progress on this by the end of the month.

@mosullivan3

This comment has been minimized.

mosullivan3 commented Apr 15, 2014

Xiaohongt a question for you if I may
Have you tried the same test that you did initially with Chrome using longPolling on IE10 with longPolling ? if so what was the outcome ?

@Xiaohongt

This comment has been minimized.

Contributor

Xiaohongt commented Apr 15, 2014

@mosullivan3 , yes I did run the same tests for long polling on IE, Chrome and firefox , ( I covered IE11, don't remember clear if covered IE10 or not, I will try it on IE10), my results show that long polling in Chrome leaks memory

@mosullivan3

This comment has been minimized.

mosullivan3 commented Apr 16, 2014

Hi again Xiaohongt,
your comment 'please double check the application javascript code',
has me somewhat concerned, it sounds like we have a disconnect, I wasn't testing any
code that I wrote, I was testing the Microsoft.AspNet.SignalR.Sample Demo code found at this url
http://www.asp.net/signalr/overview/signalr-20/getting-started-with-signalr-20/tutorial-server-broadcast-with-signalr-20

here are the steps that I took to discover the memory leak with the Sample Demo

  1. I compiled the sample in Visual Studio 2013, the only change I made was to upgrade the
    version of SignalR used in the project from v2.0.0 to the latest version i.e. v2.0.2
  2. I then deployed the SignalR.StockTicker web application to one of the default
    Application Pools that comes out of the box with IIS7.5 i.e. 'ASP.NET v4.0', ensuring
    that this SignalR.StockTicker application was the only application running in this
    particular Application Pool.
    Note: I specifically deployed this application to a 'Windows 7 SP1' OS when I did this
    test (Windows 8 is NOT an option, therefore I cannot use WebSockets as a transport).
  3. I launched IE10 and browsed to this URL
    http://localhost/SignalR.StockTickter/StockTicker.html
  4. then over the course of several days I monitored the Windows 'Resource Monitor'
    Memory usage for both the 'iexplore.exe' process and its associated 'w3wp.exe'
    process and I observed that both processes memory usage grew and grew
    Left to run for long enough it will eventually exhaust the amount of Free
    memory available to the system.

So the question that I have for you is, did you conduct a similar test to this or some other
test ?

@Xiaohongt

This comment has been minimized.

Contributor

Xiaohongt commented Apr 16, 2014

@mosullivan3 , I run the Sample Demo code before and also other tests, I can check again on the Sample Demo code. BTW, you didn't mentioned in this issue before that you were just testing the Microsoft.AspNet.SignalR.Sample Demo code, so I didn't know, however my comment is just for generically.

Xiaohongt added a commit that referenced this issue May 13, 2014

Change long polling request to use same url and Post instead of Get f…
…or workaround to handle memory leaking on browser

#2953

@muratg muratg added this to the 2.2.0 milestone May 23, 2014

@muratg muratg added 1 - Ready and removed 1 - Ready labels May 23, 2014

@muratg muratg added stress and removed stress labels May 23, 2014

Xiaohongt added a commit that referenced this issue May 29, 2014

Change long polling request to use same URL and POST instead of GET
- Update client protocol
- This change is intended to avoid a memory leak in IE/Chrome

#2953

@Xiaohongt Xiaohongt changed the title from Memory leaks in Chrome when use SignalR longPolling to Memory leaks in IE/Chrome when use SignalR longPolling May 31, 2014

Xiaohongt added a commit that referenced this issue Jun 9, 2014

Change long polling request to use same URL and POST instead of GET
- Update client protocol
- This change is intended to avoid a memory leak in IE/Chrome

#2953

Xiaohongt added a commit that referenced this issue Jun 9, 2014

Change long polling request to use same URL and POST instead of GET
- Update client protocol
- This change is intended to avoid a memory leak in IE/Chrome

#2953

Xiaohongt added a commit that referenced this issue Jun 9, 2014

Change long polling request to use same URL and POST instead of GET
- Update client protocol
- This change is intended to avoid a memory leak in IE/Chrome

#2953
@Xiaohongt

This comment has been minimized.

Contributor

Xiaohongt commented Jul 17, 2014

Verified that with the workaround SignalR longPolling doesn't have memory leak on IE11 /IE10/IE9 and Chrome 34.

@Xiaohongt Xiaohongt closed this Jul 17, 2014

@Xiaohongt Xiaohongt added 5 - Done and removed 3 - Working labels Jul 18, 2014

@mosullivan3

This comment has been minimized.

mosullivan3 commented Jan 8, 2015

Hello, just wondering when this fix is expected to be released ? The v2.2.0 milestone looks to be Past due by 4 months already. Thanks for fixing.
regards - Michael

@halter73

This comment has been minimized.

Member

halter73 commented Jan 8, 2015

2.2.0 should be released next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment