yum killed during upgrade

This morning I tried to run security updates on one of my Centos VPS systems. Had to get creative since just running yum upgrade did not work. The yum process was killed unexpectedly:

Transaction Summary
==========================
Upgrade      19 Package(s)

Total size: 24 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Killed


References


References

In searching around I found references to yum running out of memory, so I checked the logs and found a message repeated over and over again in /var/log/messages:

Mar 25 17:33:27 host kernel: [40332017.501456] Out of memory in UB 13857: OOM killed process 6693 (yum) score 0 vm:411024kB, rss:96328kB, swap:0kB
Mar 25 17:34:05 host kernel: [40332056.054988] Out of memory in UB 13857: OOM killed process 6700 (yum) score 0 vm:407640kB, rss:96456kB, swap:0kB
Mar 25 17:34:40 host kernel: [40332091.154708] Out of memory in UB 13857: OOM killed process 6725 (yum) score 0 vm:417416kB, rss:105896kB, swap:0kB


Solution

To get around this problem on my 128MB VPS I had to:

  • Stop services (crond, fail2ban-server, httpd)
  • Selectively update packages (vim, vim-minimal, kernel-firmware, kernel, libtiff, libuuid, openssl)
  • Run yum update to get the rest

I learned something new today: how to selectively update a package in CentOS:
Ex: yum update <package name>
yum update vim
yum update vim-minimal
yum update kernel-firmware
yum update kernel
yum update libtiff
yum update libuuid
yum update openssl