How to fix yum update error thread.error: can’t start new thread

yum update error thread.error: can't start new thread

If you found error thread.error: can’t start new thread on yum update command on CentOS 6, CentOS 7 or CentOS 9, this usually happens with VPS, usually because the server owner is over selling or limiting your VPS.

I have this bad experience with VPS hosted by Contabo and Digital Ocean.

# sudo yum update
Loaded plugins: fastestmirror
Determining fastest mirrors
epel/x86_64/metalink                                                                                                                                                                    | 7.5 kB  00:00:00
Traceback (most recent call last):
  File "/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/", line 375, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/", line 184, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/", line 585, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/", line 505, in doCommand
    ret = base.updatePkgs(extcmds, update_to=(basecmd == 'update-to'))
  File "/usr/share/yum-cli/", line 1069, in updatePkgs
  File "/usr/lib/python2.7/site-packages/yum/", line 5149, in update
    updates = self.up.getUpdatesTuples()
  File "/usr/lib/python2.7/site-packages/yum/", line 1094, in <lambda>
    up = property(fget=lambda self: self._getUpdates(),
  File "/usr/lib/python2.7/site-packages/yum/", line 838, in _getUpdates
    self._up = rpmUtils.updates.Updates(self.rpmdb.simplePkgList(), self.pkgSack.simplePkgList())
  File "/usr/lib/python2.7/site-packages/yum/", line 1075, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.7/site-packages/yum/", line 778, in _getSacks
  File "/usr/lib/python2.7/site-packages/yum/", line 347, in populateSack
  File "/usr/lib/python2.7/site-packages/yum/", line 122, in doSetup'prereposetup')
  File "/usr/lib/python2.7/site-packages/yum/", line 188, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/", line 202, in prereposetup_hook
    all_urls = FastestMirror(all_urls).get_mirrorlist()
  File "/usr/lib/yum-plugins/", line 369, in get_mirrorlist
  File "/usr/lib/yum-plugins/", line 413, in _poll_mirrors
  File "/usr/lib64/python2.7/", line 747, in start
    _start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread

You can fix using this command line when update:

yum update --disableplugin=fastestmirror

Now yum update can continue without error thread.error: can’t start new thread.

How to fix yum update error thread.error: can't start new thread



Leave a Reply

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