Normally, CENTOS does its job as an OS very well and response times on most CENTOS 7 systems is pretty good given the right resources, so this issue doesn’t raise it’s head often but when it does it can be a pain to locate.
The first symptom is the system seams slow, whether you are logging in or trying to run anything. If you try a systemctl status, it takes forever to complete and ends with an error.
A quick check of /run/systemd/system shows LOTS of files (and directories):
#ls -ld /run/systemd/system/session-*.scope*
-rw-r--r-- 1 root root 17 Mar 7 17:53 /run/systemd/system/session-1000019.scope
drwxr-xr-x 2 root root 140 Mar 7 17:53 /run/systemd/system/session-1000019.scope.d
This may now be solved if this bug report is correct:
A workaround for older systems:
systemctl | grep “abandoned” | sed “s/\.scope.*/.scope/” | xargs systemctl stop
Running the above command finds the abandoned sessions and kills them elegantly so the system response time comes back almost instantly.
This issue should be finally solved in the latest patch releases.