CentOSでyum updateした時のエラー

環境はCentOS 7.6.1810 (Core)

# yum update を実行すると下記の用なエラーが発生する。

[root@www ~]# yum info yum
読み込んだプラグイン:fastestmirror
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Determining fastest mirrors
Traceback (most recent call last):
File “/bin/yum”, line 29, in
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 660, in doCommand
repoid=repoid)
File “/usr/share/yum-cli/cli.py”, line 1444, in returnPkgLists
ignore_case=True, repoid=repoid)
File “/usr/lib/python2.7/site-packages/yum/__init__.py”, line 2984, in doPackageLists
avail = self.pkgSack.returnNewestByNameArch(patterns=patterns,
File “/usr/lib/python2.7/site-packages/yum/__init__.py”, line 1075, in
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

サーバを運用し始めてから初めて見るエラーで謎です。(・ω・;)

調べてみた結果は以下のようです。

メモリ不足

なんだと・・?今までメモリ不足になったことが無いのに

# topコマンドで確認

KiB Mem : 2097152 total, 1605204 free, 288200 used, 203748 buff/cache
KiB Swap: 4194304 total, 4192616 free, 1688 used. 1656340 avail Mem

# freeコマンドでも確認

[root@www ~]# free

total used free shared buff/cache available
Mem: 2097152 309008 1585180 740 202964 1636562
Swap: 4194304 1688 4192616

あれ、メモリを全然余裕じゃね?

謎です。格安サーバ(VPS)なので何が起こるかわかりません。

とりあえず、サーバアプリを一旦落としたりしてメモリを確保して再度yum updateを実行

問題なく?アップデート終わりました。