fb-mac-messenger icon indicating copy to clipboard operation
fb-mac-messenger copied to clipboard

Memory Leak

Open LukeTim opened this issue 7 years ago • 8 comments

I have noticed an issue with the App lately that if I leave it running for extended periods, even with my MacBook Pro in sleep mode, the Messenger app will end up consuming huge amounts of RAM. At one point after I had left my computer in sleep mode for a few days it was consuming 11.5GB and brought my machine to its knees.

screen shot 2017-04-23 at 17 54 48

I have been using messenger.com in a safari tab for the last couple of weeks to try and see if it was not specific to this application, but that tab is fine even after all this time and I haven't had to close and reopen it.

LukeTim avatar May 10 '17 10:05 LukeTim

I've got a similar problem, it's been getting up in the multiple GB range every few days.

ravrahn avatar Jun 26 '17 01:06 ravrahn

+1

Vervious avatar Nov 01 '17 16:11 Vervious

+1

zsolteszku avatar Feb 08 '18 18:02 zsolteszku

This is unfortunately not an issue with this app (I've spent time with instruments trying to find leaks and it all points to webkit) We could work around the issues though by force-restarting the web view once in a while, but that's a hack and would lead to a reduction in user-experience quality.

If anyone has time, please do attempt to instrument the app and investigate where memory is allocated (but never free'd.)

I'm not going to do anything about this until we know what's actually causing the issue.

rsms avatar Mar 07 '18 19:03 rsms

Just a thought, you could force restart the web view when refreshing the page. Refreshing the page did not make the memory usage go down at all - and actually went up

I encountered a similar problem in Safari in another project. https://github.com/weirongxu/plantuml-previewer.vim/issues/6

The problem that caused a memory leak was that a single image file was being repeatedly loaded, and Safari kept each copy in memory, which led to lots of memory usage. (Interestingly, chrome did not have a memory leak.) Safari wouldn't even garbage collect the old images when refreshing the page.

dylan-chong avatar May 26 '18 02:05 dylan-chong

@rsms Running the XCode analyzer gave the following warnings:

image

If you've seen this and the memory leak is not related to any of this I would like to know what can I do, specifically, to help resolve this issue. I use the app on a daily basis and it just slows down my computer a lot 😞

FranciscoJRSantos avatar Oct 19 '18 21:10 FranciscoJRSantos

fwiw I encounter pretty bad memory leaks with messenger.com running in a Chrome tab, I have to hard-reload to release the 2-3 GB it hoards after a couple days.

forresthopkinsa avatar May 23 '19 19:05 forresthopkinsa

You can run a launchd script to monitor memory usage and restart app. For example: https://github.com/longngn/fb-mac-messenger-monitor

longngn avatar Mar 08 '20 11:03 longngn