Error “Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds”
During the installation of a yum package you might get “Operation too slow. Less than 1000 bytes/sec transferred the last 30 seconds” followed by “Trying other mirror.” error message:
The reason for such a behavior is caused by slow Internet connection which is obvious from the message. The proper solution is to fix the slow Internet problem, but sometimes it’s not possible. One other possible reason is the proxy server performing scanning of the traffic, that can lead to slow transfer during the first few seconds which eventually results in the mentioned error.
The workaround is given below.
It’s possible to alter the behavior of yum package manager that will help it survive the slow download speed by setting the following parameters:
yum-config-manager --setopt=timeout=500 --save yum-config-manager --setopt=minrate=1 --save
They might require root permissions so you want to run them as root (or use sudo).
The first command increases the timeout from default 30 seconds up to 500 seconds and the second command tells yum package manager to consider 1kbps speed as a slow (default is 1000kbps).
After you run these commands the configuration file /etc/yum.conf will be appended with these 2 lines:
timeout = 500.0
minrate = 1
This means that now for the installation to fail the transfer speed has to be 1kbps during 500 consecutive seconds which is much better than default settings.
The suggested commands might serve as a quick fix for the error in question, but you should probably consider fixing your Internet line (if possible).
Thank you for reading and hope it was helpful 🙂