Solved pkg needs time to start fetching the next package.

Alexander88207

Enthusiast
Hello,

already for one week i see pkg needs about 15 seconds to start fetching the next package. The download speed is normal.

Now one question: Is it just me?

FreeBSD 12-Release

Example:

[1/20] Fetching simplescreenrecorder-0.3.11.20_1.txz: 100% 1 MiB 622.4kB/s 00:02
-
Now 10-15 seconds waiting
-
[2/20] Fetching qt5-x11extras-5.12.2.txz: 100% 19 KiB 19.1kB/s 00:01
 
When ever I see it hanging trying to get the 'next packace" I'll hit ctrl+c , then run in again then it just picks up where it left off and it is faster. the why behind any of this, I have no idea. that is just how I deal with it.
 
already for one week i see pkg needs about 15 seconds to start fetching the next package.
Check your first DNS server in /etc/resolv.conf. If the first server fails (for some reason) it takes an X amount of timeout before it'll try the second DNS server. This will cause a delay. Another issue might be IPv6, if it's configured but not working you will get a delay too as it will try to connect on IPv6 first, then timeout, then try IPv4. This would manifest as a delay too.
 
Check your first DNS server in /etc/resolv.conf. If the first server fails (for some reason) it takes an X amount of timeout before it'll try the second DNS server. This will cause a delay. Another issue might be IPv6, if it's configured but not working you will get a delay too as it will try to connect on IPv6 first, then timeout, then try IPv4. This would manifest as a delay too.

that could explain it but unfortunately both were working.
 
When ever I see it hanging trying to get the 'next packace" I'll hit ctrl+c , then run in again then it just picks up where it left off and it is faster. the why behind any of this, I have no idea. that is just how I deal with it.

imagine doing this on a new installation 500 times 😁
 
Try forcing it to use only IPv4 by adding -4; pkg -4 install something. See if that improves things.
 
Ok, then there's something wrong with your IPv6 or the package server's IPv6. With a dual stack system it will try IPv6 first, apparently that doesn't work and will time-out, then it'll try IPv4. This is what's causing the delay for you.
 
Back
Top