I'm trying to reach my server on campus from home. It is usually very well behaved and these connections are fine. When I attempt to ssh or ping I get the following:

mwoods 13 18:38:12 Trunk$ ssh me@foo.edu
ssh: connect to host foo.edu port 22: Cannot allocate memory
mwoods 14 18:40:44 Trunk$ ping foo.edu
PING foo.edu ( 56 data bytes
ping: sendto: Cannot allocate memory
ping: sendto: Cannot allocate memory
Request timeout for icmp_seq 0
ping: sendto: Cannot allocate memory
Request timeout for icmp_seq 1
ping: sendto: Cannot allocate memory
Request timeout for icmp_seq 2
--- foo.edu ping statistics ---
4 packets transmitted, 0 packets received, 100.0% packet loss

Similar story with curl. Trying to view the webpage hosted by this server creates a very fast Error 13 (net::ERR_OUT_OF_MEMORY): Unknown error. message in Chrome. It appears any connection reports insufficient memory.

I can successfully ssh to this machine if I ssh into any other machine in the building, or from another computer in my house (no issues once connected). So it is clearly something related to my laptop. I have been VPNing with Juniper "Network Connect" to completely separate network recently and this problem has only appeared since I've begun this.

So my question is, what about the VPN is causing this and how do I fix it (besides a restart of my laptop which solves the problem)?

  • (1) Can you check your syslog or vpn log(if any) for error/warning messages and add them to your question? (2) How do you start your vpn(icon/commandline)? – John Siu Jan 22 '13 at 2:04
  • No warnings or errors appear in any log in /var/log, nothing in Console.app, and I don't have access to the vpn log. The vpn is started with Juniper Network Connect. Not much to go on... – physicsmichael Jan 22 '13 at 5:33
up vote 8 down vote accepted

Quote from this apple forum post

Try following:

Methind 1

  1. ensure you have admin access
  2. go to system preferences
  3. click on network
  4. select Wi-Fi
  5. select advanced button (at the bootom right of the screen, before the "?" sign)
  6. select tcp/ip tab
  7. disable and enable tcp/ip

Method 2

sudo route delete -host
  • Thanks. The evanescent problem has resolved itself for now. I'll make sure to update this answer when it reappears and I apply these techniques. – physicsmichael Jan 23 '13 at 3:14
  • Connect VPN, close the lid and make it go to sleep :p LOL – John Siu Jan 23 '13 at 3:38
  • This worked, but I needed to actually turn off these settings for my ethernet port even though I was trying to connect to these computers with my wireless connection. I found that route get name.of.server.edu showed connecting to those machines was for some reason still bound to my ethernet card (which had been using the vpn). – physicsmichael Feb 1 '13 at 6:43
  • Awesome, but how did it work? I mean what at all does the memory error has to do even if my routing table is have bad entries ?? – Jatin Kumar Mar 14 '14 at 17:55
  • I was experiencing a similar situation; completely disabling unused thunderbolt adapters fixed the issue for me. – Andrew Jun 11 '15 at 4:22

I had the same problem on my laptop running Mac OS X 10.5, trying to connect to a VPN server running Mac OS X 10.6, each behind a NAT router on the Internet. The VPN server log showed the client laptop connecting and being issued an IP address, and the laptop showed receipt of the same VPN address (to include a ppp line in the ifconfig table). But then the laptop could not connect to anything, showing the same ping error you described (among other issues). The root cause seemed to be that the IP address of the laptop's local NAT router ( was the same as the address of the target VPN server (i.e., I simply changed the subnet of the target server network to something different (192.168.10.x), and everything connected just fine.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.