When I perform an apt-get upgrade or apt-get update, I notice that it can take almost a minute when connecting to a repo.

For example, when doing a aot-get upgrade, it will be stuck for about a minute at

Get:1 http://ubuntu.bhs.mirrors.ovh.net/ubuntu/ precise-updates/main

before speeding through the rest of the process.

Get:1 http://ubuntu.bhs.mirrors.ovh.net/ubuntu/ precise-updates/main libcurl4-gnutls-dev amd64 7.22.0-3ubuntu4.1 [1,065 kB]
Get:2 http://ubuntu.bhs.mirrors.ovh.net/ubuntu/ precise-updates/main libcurl3-gnutls amd64 7.22.0-3ubuntu4.1 [227 kB]
Get:3 http://ubuntu.bhs.mirrors.ovh.net/ubuntu/ precise-updates/main libcurl3 amd64 7.22.0-3ubuntu4.1 [236 kB]
Get:4 http://ubuntu.bhs.mirrors.ovh.net/ubuntu/ precise-updates/main curl amd64 7.22.0-3ubuntu4.1 [137 kB]
Fetched 1,665 kB in 1min 3s (26.3 kB/s)
(Reading database ... 41481 files and directories currently installed.)

Is this normal? If not, how can I troubleshoot it?

  • Try another mirror. – dawud Apr 16 '13 at 20:46
  • Perform a tcpdump at the same time. Do you see any long DNS timeouts, or any http timeouts? Do you see any outgoing requests that are not getting answered? Is your system trying to use IPv6 or something, but you don't have that properly setup? Anyway, my point is, that your problem is almost certainly something about your network, that you should be able to find with some simple inspection using the correct tools. – Zoredache Apr 16 '13 at 21:42

There's not enough information here to know exactly what is going wrong.

Try changing your dns servers in /etc/resolv.conf to something else to see if that solves the problem. You can use opendns servers instead of what is already in your /etc/resolv.conf

# Opendns

Or Google's dns servers:

# Google's dns servers

DNS may or may not be the problem, but it won't hurt to try and see if it resolves your problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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