The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP Serverload

Discussion in 'General Discussion' started by flen, May 20, 2006.

  1. flen

    flen Member

    Joined:
    Jun 12, 2005
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    On one of my cPanel/WHM servers I have a huge problem with PHP. Multiple times a day, the serverload is going to 45.00 / 50.00, if I check top at that moment, there are all PHP processes from different users, if I do top and then "u" and type the username of one of that users, I've get a whole list of PHP processes (45+ processes).

    If I'll wait about 1-2 minutes all the PHP processes disappear and the server is stable again (with a load of 1.00 / 1.20).

    This issue is about 25+ times a day, the whole server is very slow at that moment.

    Any idea? :eek:

    My config:
    CentOS 4.3 / latest cPanel/WHM stable / WHMXtra / PHP 5.0.5 with SUEXEC support on
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    Could there be cron tasks scheduled to run at or around the same time as these load issues occur?
     
  3. 24x7team

    24x7team Well-Known Member

    Joined:
    Jan 16, 2006
    Messages:
    67
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    really tough to find
    Have you checked whether these php scripts using any mysql database...?
     
  4. flen

    flen Member

    Joined:
    Jun 12, 2005
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Is there a simple way to check this? None of my crons, thats for sure. But how can I see the crons of my customers?
     
  5. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    Users' cron tasks are stored in /var/spool/cron/username
     
  6. trhosting.net

    trhosting.net Well-Known Member

    Joined:
    Mar 7, 2006
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Turkey
    I had the same problem. I found that this is caused by the kernel. When i downgraded the kernel to 2.6.9-5, all of my problems fixed. But when i tried all the new kernels of centos, the load problem still occurs.

    After all i downloaded the latest kernel from www.kernel.org and compile my own kernel. Now the machine works perfectly.

    May be your problem is same with me. First try to downgrade to kernel version 2.6.5. You can find it from centos or whiteboxlinux installations. If this is fixed your load issue then you can use this kernel, or compile the latest kernel.
     
  7. flen

    flen Member

    Joined:
    Jun 12, 2005
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Okay, going to try that :). Thanks!

    PS. Do you know what kernel you are running when you had this problem?
     
    #7 flen, May 22, 2006
    Last edited: May 22, 2006
  8. trhosting.net

    trhosting.net Well-Known Member

    Joined:
    Mar 7, 2006
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Turkey
    I tried 2.6.9-22, 2.6.9-34 and have problems with them.
    When i downgraded to 2.6.9-5 and used with no problems.

    Now i am using my own compiled kernel 2.6.16.9.
     
  9. claven177

    claven177 Well-Known Member

    Joined:
    Sep 3, 2003
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Taipei


    I had the same problem.
    My Kernel version: 2.6.9-22.EL

    Have to only downgraded to 2.6.9-5 ?
     
  10. trhosting.net

    trhosting.net Well-Known Member

    Joined:
    Mar 7, 2006
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Turkey
    First of all downgrade your kernel to 2.6.9-5 and try your system. If your system is ok then you can both use this kernel or compile your own kernel.
     
  11. claven177

    claven177 Well-Known Member

    Joined:
    Sep 3, 2003
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Taipei


    how to downgraded the kernel to 2.6.9-5 ? (step-by-step)

    Thanks
     
  12. trhosting.net

    trhosting.net Well-Known Member

    Joined:
    Mar 7, 2006
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Turkey
    if you are using 1 cpu then download
    ftp://ftp.gtlib.cc.gatech.edu/nv/ao...i386/WhiteBox/RPMS/kernel-2.6.9-5.EL.i686.rpm

    if you are using 2 or more cpus then download
    ftp://ftp.gtlib.cc.gatech.edu/nv/ao.../WhiteBox/RPMS/kernel-smp-2.6.9-5.EL.i686.rpm

    These are kernels of whitebox linux but you can use it with centos.

    Then simply install the kernel:
    rpm -ihv kernel-2.6.9-5.EL.i686.rpm

    This installs the kernel. You must check and set the grup configuration so your system boots with the new kernel. You can set if from /boot/grup/menu.lst. Simply edit it with any text editor (ex. pico) and set the kernel that you want your system to boot.

    Then reboot your system.
    You can look your kernel version giving this command: uname -r
     
  13. claven177

    claven177 Well-Known Member

    Joined:
    Sep 3, 2003
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Taipei


    Thank you very much.

    (As always I am very careful upgrading my kernel as doing it improperly can cause serious harm.
    One year ago, I have upgrade my kernel and then my box can not boot.)

    Two weeks ago, I have transfer all my accounts from RH9 to this new box (Red Hat Enterprise Linux ES release 4)
    I have a huge problem with PHP. Multiple times a day, the serverload is going to 20.00 / 30.00.

    According to above discussion, you tried kernel 2.6.9-22, 2.6.9-34 and have problems with them.
    Only downgraded to 2.6.9-5 and used with no problems.

    EV1server.net setup (RHE4 kernel 2.6.9-22.EL) new box for me.
    Why they can not directly install kernel 2.6.9-5 for every new box ?
    Maybe others did not meet the PHP Serverload problem.
    I have check all PHP processes from different users, they use xoops and php-nuke.
    (Even updtae their xoops version to new, I got the same PHP Serverload problem.)
    These is wide and common used PHP.


    Do you think why kernel 2.6.9-22.EL cause PHP Serverload problem?
    Is this a bug of kernel 2.6.9-22.EL ?



    My new box
    Code:
    root@p2006 
    
    [/]# cat /etc/grub.conf
    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE:  You have a /boot partition.  This means that
    #          all kernel and initrd paths are relative to /boot/, eg.
    #          root (hd0,0)
    #          kernel /vmlinuz-version ro root=/dev/hda5
    #          initrd /initrd-version.img
    #boot=/dev/hda
    default=0
    timeout=5
    splashimage=(hd0,0)/grub/splash.xpm.gz
    hiddenmenu
    title Red Hat Enterprise Linux ES (2.6.9-22.EL)
            root (hd0,0)
            kernel /vmlinuz-2.6.9-22.EL ro root=/dev/hda5
            initrd /initrd-2.6.9-22.EL.img
    
    # cat /etc/redhat-release
    Red Hat Enterprise Linux ES release 4 (Nahant Update 3)
    
    # uname -r
    2.6.9-22.EL
     
  14. trhosting.net

    trhosting.net Well-Known Member

    Joined:
    Mar 7, 2006
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Turkey
    I don't know the excat problem but this happens only on RHEL4 based systems (rhel4, centos, whiteboxlinux). I found a bug that tells about the file access and IO features changed on centos after the kernel 2.6.9-5. May be this is the problem, i don't know. But the newer kernels have the same problem.
     
Loading...

Share This Page