Python High CPU
Hi, I'm running Cloud Linux with installed cPanel. I got notification from my Monitoring System that my cPanel Server is using too much CPU (High CPU Detected).
I tried check it on the server via terminal and it shows there are python which is use High CPU. IDK who's doing this because the user it shows "cpanel-+"
[QUOTE]
top - 08:25:09 up 3 days, 21:45, 1 user, load average: 1.73, 1.51, 1.47
Tasks: 987 total, 10 running, 976 sleeping, 0 stopped, 1 zombie
%Cpu(s): 33.4 us, 4.1 sy, 0.0 ni, 62.1 id, 0.0 wa, 0.3 hi, 0.1 si, 0.0 st
MiB Mem : 15800.5 total, 1479.1 free, 11282.3 used, 3039.2 buff/cache
MiB Swap: 8060.0 total, 7023.6 free, 1036.4 used. 3694.1 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
849367 cpanel-+ 20 0 201656 71268 11252 R 41.6 0.4 0:01.26 python
849370 cpanel-+ 20 0 191084 65144 10496 R 37.6 0.4 0:01.14 python
849377 cpanel-+ 20 0 165880 50412 10532 R 24.8 0.3 0:00.75 python
849384 cpanel-+ 20 0 164876 49528 10452 R 21.5 0.3 0:00.65 python
849385 cpanel-+ 20 0 165232 49576 10444 R 21.5 0.3 0:00.65 python
849386 cpanel-+ 20 0 165236 49728 10596 R 21.1 0.3 0:00.64 python
I want to know who's user is causing this. I tried to kill it, but it seems the PID is keep changing over and over.
I want to know who's user is causing this. I tried to kill it, but it seems the PID is keep changing over and over.
-
It appears that the high CPU usage on your cPanel server is being caused by multiple instances of a Python process running under the user "cpanel-+". Since the PID (Process ID) keeps changing, it indicates that new Python processes are being spawned continuously. To identify the source of these Python processes, you can use the following steps: - Run the `ps aux | grep python` command in the terminal. This will list all the running Python processes along with their corresponding user information.
- Look for any specific details or patterns in the output that might help identify the source of the processes. Pay attention to the command arguments or any associated files.
- If you find any suspicious Python processes or any additional information that could help narrow down the cause, you can investigate further.
- It's also worth checking if any specific scripts or applications are running on your server that might be responsible for spawning these Python processes. Review your server logs or any cron jobs that could be triggering the processes.
- To temporarily alleviate the high CPU usage, you can try killing the Python processes using the `kill ` command, replacing `` with the actual process ID. However, note that this might only be a temporary solution if the underlying cause is not addressed.
0 -
Excellent reply, @kodeslogic! 0 -
Thank you, I already tried your step to Identify the source of these Python processes... When I run 'ps aux | grep python', it shows this: [QUOTE] cpanel-+ 3054788 0.0 0.2 138660 34000 ? R 08:56 0:00 /opt/cpanel-ccs/.develop/virtualenv/bin/python /opt/cpanel-ccs/.develop/virtualenv/bin/twistd --reactor=select -n caldav -f /opt/cpanel-ccs/conf/caldavd-dev.plist -o ProcessType=Slave -o BindAddresses=:: -o PIDFile=caldav-instance-8.pid -o ErrorLogFile=None -o ErrorLogEnabled=False -o LogID=8 -o MultiProcess/ProcessCount=15 -o ControlPort=0 -o MetaFD=35 cpanel-+ 3054789 0.0 0.1 129724 31608 ? R 08:56 0:00 /opt/cpanel-ccs/.develop/virtualenv/bin/python /opt/cpanel-ccs/.develop/virtualenv/bin/twistd --reactor=select -n caldav -f /opt/cpanel-ccs/conf/caldavd-dev.plist -o ProcessType=Slave -o BindAddresses=:: -o PIDFile=caldav-instance-9.pid -o ErrorLogFile=None -o ErrorLogEnabled=False -o LogID=9 -o MultiProcess/ProcessCount=15 -o ControlPort=0 -o MetaFD=37 cpanel-+ 3054790 0.0 0.1 128612 30088 ? R 08:56 0:00 /opt/cpanel-ccs/.develop/virtualenv/bin/python /opt/cpanel-ccs/.develop/virtualenv/bin/twistd --reactor=select -n caldav -f /opt/cpanel-ccs/conf/caldavd-dev.plist -o ProcessType=Slave -o BindAddresses=:: -o PIDFile=caldav-instance-10.pid -o ErrorLogFile=None -o ErrorLogEnabled=False -o LogID=10 -o MultiProcess/ProcessCount=15 -o ControlPort=0 -o MetaFD=39 cpanel-+ 3054791 0.0 0.2 136344 33400 ? R 08:56 0:00 /opt/cpanel-ccs/.develop/virtualenv/bin/python /opt/cpanel-ccs/.develop/virtualenv/bin/twistd --reactor=select -n caldav -f /opt/cpanel-ccs/conf/caldavd-dev.plist -o ProcessType=Slave -o BindAddresses=:: -o PIDFile=caldav-instance-11.pid -o ErrorLogFile=None -o ErrorLogEnabled=False -o LogID=11 -o MultiProcess/ProcessCount=15 -o ControlPort=0 -o MetaFD=41 cpanel-+ 3054792 0.0 0.2 136220 33444 ? R 08:56 0:00 /opt/cpanel-ccs/.develop/virtualenv/bin/python /opt/cpanel-ccs/.develop/virtualenv/bin/twistd --reactor=select -n caldav -f /opt/cpanel-ccs/conf/caldavd-dev.plist -o ProcessType=Slave -o BindAddresses=:: -o PIDFile=caldav-instance-12.pid -o ErrorLogFile=None -o ErrorLogEnabled=False -o LogID=12 -o MultiProcess/ProcessCount=15 -o ControlPort=0 -o MetaFD=43 cpanel-+ 3054793 0.0 0.1 130492 32044 ? R 08:56 0:00 /opt/cpanel-ccs/.develop/virtualenv/bin/python /opt/cpanel-ccs/.develop/virtualenv/bin/twistd --reactor=select -n caldav -f /opt/cpanel-ccs/conf/caldavd-dev.plist -o ProcessType=Slave -o BindAddresses=:: -o PIDFile=caldav-instance-13.pid -o ErrorLogFile=None -o ErrorLogEnabled=False -o LogID=13 -o MultiProcess/ProcessCount=15 -o ControlPort=0 -o MetaFD=45 cpanel-+ 3054794 0.0 0.1 128612 30088 ? R 08:56 0:00 /opt/cpanel-ccs/.develop/virtualenv/bin/python /opt/cpanel-ccs/.develop/virtualenv/bin/twistd --reactor=select -n caldav -f /opt/cpanel-ccs/conf/caldavd-dev.plist -o ProcessType=Slave -o BindAddresses=:: -o PIDFile=caldav-instance-14.pid -o ErrorLogFile=None -o ErrorLogEnabled=False -o LogID=14 -o MultiProcess/ProcessCount=15 -o ControlPort=0 -o MetaFD=47
After that I just disable Calendar and Contacts Server (CCS) Plugin and the CPU usage return to normal again. IDK if this a good choice I make to disable the CCS Plugin.It appears that the high CPU usage on your cPanel server is being caused by multiple instances of a Python process running under the user "cpanel-+". Since the PID (Process ID) keeps changing, it indicates that new Python processes are being spawned continuously. To identify the source of these Python processes, you can use the following steps:
- Run the `ps aux | grep python` command in the terminal. This will list all the running Python processes along with their corresponding user information.
- Look for any specific details or patterns in the output that might help identify the source of the processes. Pay attention to the command arguments or any associated files.
- If you find any suspicious Python processes or any additional information that could help narrow down the cause, you can investigate further.
- It's also worth checking if any specific scripts or applications are running on your server that might be responsible for spawning these Python processes. Review your server logs or any cron jobs that could be triggering the processes.
- To temporarily alleviate the high CPU usage, you can try killing the Python processes using the `kill ` command, replacing `` with the actual process ID. However, note that this might only be a temporary solution if the underlying cause is not addressed.
0 -
I wouldn't expect CCS to be causing a load on the server. If that's what you're seeing, could you submit a ticket so we can take a look at the system? 0 -
I will make a ticket after I get permission from my supervisor. I wouldn't expect CCS to be causing a load on the server. If that's what you're seeing, could you submit a ticket so we can take a look at the system?
0
Please sign in to leave a comment.
Comments
5 comments