Symptoms
You may see YUM commands fail with errors similar to the following.
# yum update
Loaded plugins: fastestmirror, universal-hooks
Loading mirror speeds from cached hostfile
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in <module>
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 375, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 184, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 585, in doCommands
return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
File "/usr/share/yum-cli/yumcommands.py", line 505, in doCommand
ret = base.updatePkgs(extcmds, update_to=(basecmd == 'update-to'))
File "/usr/share/yum-cli/cli.py", line 1069, in updatePkgs
self.update()
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 5149, in update
updates = self.up.getUpdatesTuples()
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1094, in <lambda>
up = property(fget=lambda self: self._getUpdates(),
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 838, in _getUpdates
self._up = rpmUtils.updates.Updates(self.rpmdb.simplePkgList(), self.pkgSack.simplePkgList())
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1075, in <lambda>
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 778, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.7/site-packages/yum/repos.py", line 347, in populateSack
self.doSetup()
File "/usr/lib/python2.7/site-packages/yum/repos.py", line 122, in doSetup
self.ayum.plugins.run('prereposetup')
File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 188, in run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/lib/yum-plugins/fastestmirror.py", line 202, in prereposetup_hook
all_urls = FastestMirror(all_urls).get_mirrorlist()
File "/usr/lib/yum-plugins/fastestmirror.py", line 369, in get_mirrorlist
self._poll_mirrors()
File "/usr/lib/yum-plugins/fastestmirror.py", line 413, in _poll_mirrors
pollThread.start()
File "/usr/lib64/python2.7/threading.py", line 747, in start
_start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread
Description
This is caused by the fastestmirror plugin spawning enough threads to hit the thread limit allowed for a process.
Workaround
The threads spawned by the fastestmirror plugin can be lowered via the maxthreads setting.
1) Open the /etc/yum/pluginconf.d/fastestmirror.conf file in your editor of choice.
nano /etc/yum/pluginconf.d/fastestmirror.conf
vim /etc/yum/pluginconf.d/fastestmirror.conf
2) Find and reduce the lowest occurance of maxthreads and save the file.
Alternatively, the plugin can be disabled by setting enabled to 0.
Comments
0 comments
Article is closed for comments.