Fix for the stalled downloads in Leopard

I was experiencing the occasional weird behaviour on downloading large files in Leopard: the download would stall, but after stopping/restarting (which can be done in Safari and iTunes), the download would continue. It was not very consistent, and I suspected the NAT router or even Rogers – some sites were occasionally having this problem, while other sites would not.

While playing with JRuby over the weekend, this happened again and pretty much prevented the gem installation – because the multi-megabyte gem index would not download from http://gems.rubyforge.org/. Strangely enough, same download would work on Tiger, on Linux and on Windows using same router – which pretty much excluded router as a cause.

I found simple fix here – big thanks to Chris D Searle. Run the following:

sudo sysctl -w net.inet.tcp.rfc1323=0

(it replaces the default value of 1)

I do not know all the details of the fix – it switches off some TCP window optimization which may have been the cause of the problem. More on the parameter and how to set it in variety of OS-es can be found in the TCP tuning handbook.

To make change permanent, create (or edit) the file /etc/sysctl.conf with the content:

net.inet.tcp.rfc1323=0
Advertisements
Explore posts in the same categories: Mac

7 Comments on “Fix for the stalled downloads in Leopard”

  1. Daniel Tucker Says:

    Hey, thanks for the tip. Just got a new MBP and I was just about ripping my hair out till I found this. I hope it gets fixed officially soon. BTW, should I just create the etc in the main hd? I’m not familiar with unix structure though I’m pretty sure it should just be in the base directory.

  2. Miro Says:

    You already have /etc :-). It is not shown in finder, but try in terminal ‘ls -la /etc’.

  3. Daniel Tucker Says:

    thanks 🙂

  4. Audiochild Says:

    Hi Daniel or Miro….

    I’m going crazy with these “Leopard” download stalls myself…but i’m a little too new to understand exactly what to do with that string of text…would love some help

    thanks

  5. Miro Says:

    I would first try it out by logging as administrator, opening terminal and just typing
    sysctl -w net.inet.tcp.rfc1323=0
    on a new line. It shoud returnline like
    net.inet.tcp.rfc1323: 1 -> 0

    The sudo command beforehand allows you to get temporarily admin priviledges if you are not admin (it is advisable run as non-admin for everyday use). It asks for pasword, which is the password of the currently logged on user, not the password of the admin user.

  6. Miro Says:

    I would first try it out by logging as administrator, opening terminal and just typing
    sysctl -w net.inet.tcp.rfc1323=0
    on a new line. It shoud returnline like
    net.inet.tcp.rfc1323: 1 -> 0

    The sudo command beforehand allows you to get temporarily admin priviledges if you are not admin (it is advisable run as non-admin for everyday use). It asks for pasword, which is the password of the currently logged on user, not the password of the admin user.

  7. Audiochild Says:

    thanks for the clarification…will give it a go


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: