Sometimes a process will get stuck in a loop on a server either because it has run out of memory, buggy code has been pushed live, or any other number of reasons. One of the first steps in this situation before killing (kill -9) the process should be to try to figure out why the process is looping. This can be done with strace. Use the below command to gain more information about the PID (Process ID).
To output the information to your shell.
- [root@server ~]#strace -p <PID>
To dump the output to a file to analyze later on use the below command.
- [root@server ~]#strace -p <PID> > /tmp/strace-output 2>&amp;1
To install strace on CentOS via yum
- [root@server ~]#yum install strace
This information should assist with better troubleshooting the issue.