Skip to main content

Python High CPU

Comments

5 comments

  • kodeslogic
    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.
    If you're unable to identify the source of the Python processes or if the issue persists after killing them, it may be necessary to consult with a
    0
  • cPRex Jurassic Moderator
    Excellent reply, @kodeslogic!
    0
  • ventustium
    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.
    If you're unable to identify the source of the Python processes or if the issue persists after killing them, it may be necessary to consult with a
    0
  • cPRex Jurassic Moderator
    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
  • ventustium
    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.