Yum thread.error: can’t start new thread

When you do a yum update, you will periodically encounter this error

Yum thread.error: can’t start new thread

This error is caused by a bug in the fastestmirror plugin in Yum. To resolve this error, there are two solutions that you can try:

(A) Solution I

(i) Stop the mysql server with the command:

/etc/init.d/mysqld stop

or

service mysqld stop

(you may get an error that service not recognized)

(ii) Start the Yum update without the fastestmirror plugin with this command:

yum --disableplugin=fastestmirror update

This will enable you to update Yum.

After the update, restart mysqld with the command:

 /etc/init.d/mysqld restart

or

service mysqld restart

(B) Solution II

If you are running a script that automatically updates Yum (such as an nginx autoinstaller), use this solution. This is based on the premise that the fastestmirror plugin may have been installed but not enabled. To enable it, find the file “fastestmirror.conf”. Its full location is

/etc/yum/pluginconf.d/fastestmirror.conf

Open it in notepad and substitute the existing content for this:

[main]
verbose = 0
socket_timeout = 3
enabled = 1
hostfilepath = /var/cache/yum/timedhosts.txt
maxhostfileage = 1

Now when you start the autoinstaller, it should be error-free.

3 thoughts on “Yum thread.error: can’t start new thread

Leave a Reply

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