Apple - getting "out of memory" error when trying to load specific websites (am not out of RAM)

I wasn't able to get my network back by disabling and re-enabling TCP/IP or the Wi-Fi. It seems in my case the computer had gone to sleep with a Juniper VPN connection and when it woke back up the connection had timed out and the routes weren't cleaned up. For me, I had two computers, one working and one not, and so was able to identify the problem after running netstat -rn.

On the computer that wasn't working, I had a destination of 192.168.43.1 with a gateway of link#5. On the computer that WAS working, the gateway for that destination was the mac address of the wireless router, so I removed that route with:

sudo route delete -host 192.168.43.1

After this, I could ping my wireless router and also get back to the internet.

Some people claimed that going to Settings → Network → Wi-Fi → Advanced → Proxies and turning on Auto Proxy Discovery worked for them. I was not able to verify this as my connection was fixed by deleting the 'dead' route.


This is neither a RAM nor a disk related problem.

This is a kernel problem due to a misbehaviour of one of your network interfaces. Here are a few commands to start locating the origin of this problem when it occurs:

  • netstat -mm will provide a detailed information about your buffers pool usage;
  • netstat -I en0 if your actual network interface in use is en0 (Ethernet) will show you any actual errors (Ierrs, Oerrs);
  • netstat -r will show you if your routes toward the rest of the world are correct.

This misbehaviour may be the consequence of an automatic or targeted network attack. If you suspect that you may be facing such a case, here is a way to look the truth right in the eyes:

  • leave any network application (Safari, Mail, ssh…) so as to limit your own known noise (on your network interface);
  • open a Terminal and type: /usr/bin/sudo tcpdump -i en0 (if your interface is en0 == Ethernet);
    • if the output of tcpdump stays silent, you aren't attacked, just exit this privileged application by typing control-C
    • if the output of tcpdump is flooding, you are attacked. If you are in such a case, please post an extract of this output and of the 3 above commands outputs.

This should be fairly easy to track down with the sysdiagnose tool.

When you get a browser wedged and spitting errors, open terminal and add the browser name as an argument to the script: (so if Safari is crashing)

 sysdiagnose Safari

This tool will call sudo which needs you to type your password (it won't show to the screen, so type it slowly if you are new to sudo or prone to mis-type your password if you don't see it being typed).

At this point, you will get a huge system diagnosis tar.gz file stored in /private/var/tmp that you can copy to your desktop and pore over. It will be a bit like looking for a needle in a haystack - but you can be sure some resource is getting filled if a reboot makes things work until whatever bug or resource is triggered/used again.