Yum Error: Timeout on repomd.xml. Operation too slow

A few days ago I was updating one of my personal dedicated servers and I got this weird error: Yum Error: Timeout on repomd.xml. Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds. The full output was something like this:

[[email protected]:~]yum update
Loaded plugins: fastestmirror
Setting up Update Process
Determining fastest mirrors
epel/metalink | 24 kB 00:00
* base: centos.hyve.com
* elrepo: mirrors.coreix.net
* epel: mirrors.coreix.net
* extras: mirror.sov.uk.goscomb.net
* updates: centos.hyve.com
http://centos.hyve.com/6.8/os/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://centos.hyve.com/6.8/os/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds')

It seems the mirror was really slow, and yum keep trying to connect again:

Trying other mirror.
base | 3.7 kB 00:00
base/primary_db | 4.7 MB 00:00
elrepo | 2.9 kB 00:00
elrepo/primary_db | 730 kB 00:00
epel | 4.3 kB 00:00
epel/primary_db | 5.9 MB 00:00
extras | 3.4 kB 00:00
extras/primary_db | 37 kB 00:00
http://centos.hyve.com/6.8/updates/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://centos.hyve.com/6.8/updates/x86_64/repodata/repomd.xml: (28, 'Operation too slow. Less than 1 bytes/sec transfered the last 30 seconds')
Trying other mirror.
updates | 3.4 kB 00:00
updates/primary_db | 3.1 MB 00:00
No Packages marked for Update

In order to fix this, I had to edit CentOS base repo:

nano -w /etc/yum.repos.d/CentOS-Base.repo

And comment out the mirror lines, like this:

#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra

Then cleaned up the yum repo and ran update again:

yum clean all
yum update

CentOS updates are now working again 🙂

About the Author: Santiago Borges

Experienced Sr. Linux SysAdmin and Web Technologist, passionate about building tools, automating processes, fixing server issues, troubleshooting, securing and optimizing high traffic websites.

Leave a Reply

Your email address will not be published. Required fields are marked *