'RPM causes high CPU ussage on CentOS CWP

Today the server was under high load for couple of hours when complex PHP script was executed without supervision.

After that the CPU load was constantly at 100% with RPM processes taking up most of the resources. RPM processes do not hang, they appear and disappear after few seconds. If I do "kill -9 rpm" the CPU load would drop to regular 20-40% level. After the server was restarted the problem would happen again on startup.

I tried to execute this sequence:

killall -9 rpm
rm -fv /var/lib/rpm/__*
rpm --rebuilddb -v -v

but the problem persists.

Before the CPU load was always in 20-40% range (viewed in CWP admin panel), now is always 100% because of multiple RPM processes.

I also upgraded the server (digital ocean droplet) to: OS: CentOS Stream release 8 Kernel: 4.18.0-383.el8.x86_64 CPU: 2 Core (1996 MHz)

But the problem is the same with: 50-70% load, and 10-20% load when "killall -9 rpm" is executed. Sometimes after the restart event the killall does not help.

How to fix this problem or how to investigate what is causing this?

rpm cpu load

average cpu load 14 days



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source