Memory leak while surfing Safari

When you just opened Safari (5.0.3 (6533.19.4)) then requires 30-31 MB RAM from OS system (10.6.6 10J567).

User uploaded file

But eventually Safari takes more and more memory.

After one hour active surfing Safari is take on over 380 MB RAM.

User uploaded file

And after closed all window and tab memory size almost not decrease.
Memory is not freed and not returns to system.

Finally, if you do not restart Safari, it slowed, and then crash.

Tested on 2 - iMac (24 and 27), 1 - MacBook Pro 15, 3 - MacPro.


+P.S. Sorry for my english!+

iMac, Mac OS X (10.6.6), Intel Core 2 Duo

Posted on Feb 12, 2011 12:05 PM

Reply
54 replies

Apr 14, 2011 8:42 AM in response to Stuart Wheeler

A couple of possible options have occurred to me since posting this.

Firstly, switch to private browsing, then reset Safari so it clears cache and history. If, as I suspect, the problem relates to caching pages in history and making them searchable, then private browsing stops your browser history. It's a sledgehammer approach, but may help.

Secondly, switch to another browser. As I type this I am using SRWare Iron, a chromium based browser without all the Google tracking. It is quick enough for my uses and real memory so far is about 85 MB, and that is with several tabs open. It also supports extensions. Until Safari is cured of hogging memory, then I'll stick with this.

May 2, 2011 9:28 AM in response to Ruslan-RHD

Same here! 😠


After a while (running a few days) Safari makes my MBP almost unusable - taking 3.5GB of (virtual) memory. If I close some other applications (Thunderbird etc.), it starts taking "their" (real) memory too ...

Interesting also, that even closing all Safari tabs and windows except one doesn't reduce the memory or the number of threads (30 threads in my case) used by Safari.

I'm using snow leopard (10.6.7) and safari 5.0.5 ...

Currently I have to quit Safari at least once a week ...


I have 4GB RAM and think to upgrade to a new MBP with 8GB RAM - but if Safari will eat again all and everything, then it doesn't make any sense to me to buy a new MBP ...

May 3, 2011 7:35 AM in response to Ruslan-RHD

I've been having the same problem. I usually have to restart Safari at least once a day to keep usage at reasonable levels... and this is with only 3-4 tabs open.


I've completely turned off Top Sites, thinking it was running in the background too much. I'm using Click to Flash, so it's rare Flash is running. Turning Extensions on or off makes no difference.


Just a thought: are those of us having this issue all using Glims? It's the only thing I haven't tried removing or disabling.


10.6.7 and Safari 5.0.5


Camino with 2 tabs open is running under 100MB for several hours. I don't think it's ever gone much above that.


Safari is already at 298MB with 6 tabs open, and it was just restarted about 20 minutes ago.

May 5, 2011 9:24 AM in response to RedGeminiPA

I do use Glims, as it will at least remember all my open tabs for those times I'm forced to reboot Safari, when it climbs to using up 2-6 GBs of my 8GB of RAM, and the computer slows to a crawl.... I've disabled all my extensions, IMHO, a ridiculous length to go, just in order to prevent Safari from completely draining all my new iMac's resources, especially since Apple touts all the great things we can do, using extensions. Many of the "experts" in this forum use as a typical "solution", to disable all extensions, then try them all, one at a time, to figure which ones, if any, are the cause of all this memory use. A laborious, & highly time-consuming process we should NOT have to be doing, just to use their browser. If some of the extensions are that bad at hogging memory, then Apple's techs should discover this BEFORE making them available for public usage, it should not be left to every user to do individually, that's ridiculous....

May 30, 2011 11:14 AM in response to Ruslan-RHD

I'm also seeing some slowness with safari. My 27 inch quad core i7 iMac with 8 GB of ram starts to really slow down and I can hear the disk drive going nuts. Either safari is using far too much disk access or there is a lot of swapping going on.


Very frustrating. I will try the solution mentioned above about private browsing and see if that helps at all. The theory that pages are getting cached and then made searchable sounds plausible.

Jun 18, 2011 3:53 AM in response to Ruslan-RHD

Over the years I have become inured to the annoyance that is the Safari memory leak and routinely find that I have to quit the app, relaunch, and then restore the last opened sites. Various excuses have been provided for this annoyance--"It's a Flash issue", "It's add-ins", etc., etc. Whatever it is, it's a Safari-unique annoyance and not an issue with Firefox or Chrome. And now it seems to have gotten worse--operating as I normally do (yes, I do have multiple tabs open), Safari eats up a gig of memory in no time and now I frequently see it grab over 2 GB. Sadly, there are other features that I do like in Safari so I'm suffering through, but if this activity continues, I will be forced to switch to FF or Chrome.

Jun 21, 2011 4:51 PM in response to Ruslan-RHD

Safari leaks for me as well.


Typically after a couple of hours, it takes up 2-3GB of RAM.


I've downloaded Secrets (just an easy interface to the defaults command) and have done some things like turn off Top Sites, reduce back/forward pages to 50... reduce history size to 100. Etc.


We'll see if that helps.


If not, I'll be switching back to Firefox, as this isn't really workable anymore.


I will check back with this thread.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Memory leak while surfing Safari

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.