15

I have a server on Hetzner that running Ubuntu 16.04 minimal.

The issue is a slow connection to external sources. When I'm trying to ping everything looks fine. But when I'm trying to retrieve files from git server (Bitbucket) it takes ages.

The situation gets worse when I'm trying to request using Python Interpreter. Here are the results: command results

When I wrote to support about this issue, they requested mtr results so I'm adding those too:mtr

List of current rules:

qdisc mq 0: root 
 Sent 188170970 bytes 419951 pkt (dropped 0, overlimits 0 requeues 44) 
 backlog 0b 0p requeues 44 
qdisc pfifo_fast 0: parent :1 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
 Sent 50287079 bytes 107135 pkt (dropped 0, overlimits 0 requeues 8) 
 backlog 0b 0p requeues 8 
qdisc pfifo_fast 0: parent :2 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
 Sent 44682112 bytes 105143 pkt (dropped 0, overlimits 0 requeues 13) 
 backlog 0b 0p requeues 13 
qdisc pfifo_fast 0: parent :3 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
 Sent 47973033 bytes 104060 pkt (dropped 0, overlimits 0 requeues 6) 
 backlog 0b 0p requeues 6 
qdisc pfifo_fast 0: parent :4 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
 Sent 45228746 bytes 103613 pkt (dropped 0, overlimits 0 requeues 17) 
 backlog 0b 0p requeues 17

Can anybody please help me to resolve the issue?

1
  • I had a similar problem on Ubuntu 18.04. My speed test was working fine but when I was installing/updating packages, it was taking very long. Browising was also a problem. This solution fixed it for me.
    – nwaweru
    Dec 10, 2019 at 7:39

1 Answer 1

28

I've found the cause of the issue. The slow connection was because of IPv6 configuration. When I disabled IPv6, everything worked fine.

$ sudo nano /etc/sysctl.conf

Added these configurations at the end of file:

# IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

Then restarted sysctl.conf:

$ sudo sysctl -p
11
  • 2
    Thanks so much, worked like a charm on Ubuntu 16.04.3 . How did you find out the issue had to do with IPv6? Jan 29, 2018 at 16:58
  • 1
    working for me.
    – IT Vlogs
    Jun 12, 2018 at 9:51
  • 1
    This is frustrating, I implemented the advice here and it hasn't solved the issue. I feel like this is not really helpful since I am still left in the dark about how to diagnose the issue and find the problem.
    – Ami Heines
    Jun 22, 2018 at 13:50
  • 1
    I still have bad network what should I do :,( Feb 13, 2019 at 15:29
  • 1
    This did not work for me. While my Win7 machine gets 176 Mbps down, while my Ubuntu 16.04.6 LTS machine gets only 77 Mbps down--still. :(
    – mig81
    Feb 24, 2019 at 10:41

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.