100% CPU ISPconfig's server

Discussion in 'Server Operation' started by DZR, Dec 16, 2019.

  1. DZR

    DZR New Member

    Hello,

    Since the recent migration with the ISP migration toolkit to the new ISP, I have had, for a few days, cpu peaks that go up to 100%, which makes the server overloaded and the sites are no longer accessible, which is very annoying.
    this is the process that makes the cpu go up to 100% when I do htop:
    /usr/sbin/apache2 -k start

    Do you have any idea to solve the problem ?

    Thank you,
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    There is something on that website that takes all the CPU. Examine more what is happening. What is installed on that website?
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    You might want to change the tile to 100% CPU Apache server as ISPConfig is not the source of the high CPU usage. Besides that, look at the apache log file like @Taleman suggested, it might be a light DOS attack against one of your sites or the new server is not as optimized as the old one (a bottleneck can be MySQL) or a component on the new server is slower than on the old one, e.g. disk performance. E.g. I received a new server in the past where one of the disks was damaged and hat a really bad performance which then caused very high load due to many processes waiting to access the disk.
     
  4. DZR

    DZR New Member

    Yes sorry for the tittle,
    Thanks for your answer, I don't think it's a component, because it's the same physical disks, and it's the same bay.
    And for the DOS attack, do you have any idea how to analyze more closely in order to know which site is a problem?
    And if there is a temporary solution because it's really annoying...
    Thank you !
     
  5. Steini86

    Steini86 Active Member

    Some tools that might help you to find the problem:
    - iotop (showing I/O on the system)
    - netstat -t (showing connections)
    - in htop use:
    # s for strace a process
    # l for lsof to see the open files of a processes
    # L to ltrace.

    Does the server have the same config/versions? You should use http/2 for SSL connections, and php-fpm for PHP sites. New PHP versions are much faster (less cpu usage) than the old ones.
    Without knowing anything, I would bet for a bad PHP script, probably some Wordpress (module) :cool:
    If you have found the problematic php script, you can debug it like here: https://stackoverflow.com/questions/21133/simplest-way-to-profile-a-php-script
     
  6. DZR

    DZR New Member

    I think it probably bad PHP script too, but how can I find it ?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    When you have suexec enabled in your websites, then each site runs under its own Linux user and you can see in commands like top or ps which site it is as the ID of the web user is the ID of the website. So when you have a lot of load from a user like 'web55', then you know that the website is '55' in ISPConfig.
     
  8. DZR

    DZR New Member

    It's possible whether it be Passenger's packet ?
     

Share This Page