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.

high "sy" load - broken apache?

Discussion in 'EasyApache' started by 50c, Apr 24, 2006.

  1. 50c

    50c Active Member

    Joined:
    Jun 26, 2004
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    Hi there,
    i have the following problem:

    Lately i have upgraded to MySQL 5.xx, since then there were some load problems with Httpd, i had a lot of httpd <defunc> commands so i decided to reconpile APACHE. After that those "httpd <defunc>" processes vanished and i was quite happy...

    20 minutes after this the load suddenly bounced up to 50 - 60, sometimes it went down to 10. I noticed that here is a high CPU usage of the system. see the image->

    [​IMG]

    The sy load is always greater than us load and it copyies the evolution of user load aswell.. Sometimes the system load is 50% and the user load is 40%. When i stop apache, the load goes down to 0 and there is no "Sy" load. If user load goes up, system load goes up too and reversed. I noticed that there is no MYSQL load at all. Mysql processes used to be top cpu eaters and now i hardly see one in top... Instead of them there is a few of httpd processes that eat a lot of CPU, see the image:

    [​IMG]

    I have no idea what it could be... There are no sh*tty coded scripts and there are no slow mysql queries. I have recompiled Apache 4x times and always the same thing.

    Please Help

    Thanks

    Mike
     
    #1 50c, Apr 24, 2006
    Last edited: Apr 24, 2006
  2. abubin

    abubin Well-Known Member

    Joined:
    Dec 7, 2004
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    I am not sure if this could help but maybe you can test site by site. Meaning remove your websites one by one out of the equation. That way, maybe you could track the problem to a specified site provided that this problem is due a certain site.

    At least you narrow down the problem.
     
  3. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18

    Before you do that you could try and see if this reveals something :

    lsof -p pid
    strace -p pid

    Or perhaps try netstat to see if you have many connection from certain IP's.
     
  4. 50c

    50c Active Member

    Joined:
    Jun 26, 2004
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    UK
    Ok,
    i've done strace -p on those heavy HTTPD processes and there are some errors
    (Broken pipe, Operation not supported, Resource temporarily unavai lable).

    Output:

    _llseek(9, 0, [0], SEEK_CUR) = 0
    _llseek(9, 0, [0], SEEK_SET) = 0
    read(9, "<?\r\n\t$db_host=\"localhost\";\r\n\t$db"..., 4096) = 224
    _llseek(9, 224, [224], SEEK_SET) = 0
    read(9, "", 4096) = 0
    read(9, "", 8192) = 0
    read(9, "", 8192) = 0
    close(9) = 0
    munmap(0xf67c7000, 4096) = 0
    fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0
    read(5, "", 8192) = 0
    fcntl64(5, F_SETFL, O_RDWR) = 0
    write(5, "\1\0\0\0\16", 5) = -1 EPIPE (Broken pipe)
    --- SIGPIPE (Broken pipe) @ 0 (0) ---
    shutdown(5, 2 /* send and receive */) = 0
    close(5) = 0
    socket(PF_FILE, SOCK_STREAM, 0) = 5
    fcntl64(5, F_GETFL) = 0x2 (flags O_RDWR)
    fcntl64(5, F_GETFL) = 0x2 (flags O_RDWR)
    fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0
    connect(5, {sa_family=AF_FILE, path="/var/lib/mysql/mysql.sock"}, 110) = 0
    fcntl64(5, F_SETFL, O_RDWR) = 0
    setsockopt(5, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not supported )
    setsockopt(5, SOL_SOCKET, SO_KEEPALIVE, [1], 4) = 0
    poll([{fd=5, events=POLLIN, revents=POLLIN}], 1, 60000) = 1
    read(5, "=\0\0\0", 4) = 4
    read(5, "\n5.0.19-standard\0000\224\3\0003|<SkABf\0,\242"..., 61) = 61
    write(5, "6\0\0\1\215 \0\0\0trafficm_tmaster\0DRQZ[^"..., 58) = 58
    read(5, "\5\0\0\2", 4) = 4
    read(5, "\0\0\0\2\0", 5) = 5
    fcntl64(5, F_SETFL, O_RDWR|O_NONBLOCK) = 0
    read(5, 0xa1acf78, 8192) = -1 EAGAIN (Resource temporarily unavai lable)
    fcntl64(5, F_SETFL, O_RDWR) = 0

    It has something to do with MYSQL, am i right? (/var/lib/mysql/mysql.sock)
    Could it be that there are some compatibility issues with mysql? I have recently upgraded to MySQL 5.0...


    Thanks
     
  5. abubin

    abubin Well-Known Member

    Joined:
    Dec 7, 2004
    Messages:
    393
    Likes Received:
    1
    Trophy Points:
    18
    That is a common error on mysql. I am also having this error on my server. There is a thread called "mysql panicing" which discuss extensively about this problem but so far no solution yet. And I don't think your problem is because of that because with this problem you will see tons of mysql processes taking up over 70mb of memory each. But you have httpd processes problem and that's different.
     
  6. brianoz

    brianoz Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,146
    Likes Received:
    6
    Trophy Points:
    38
    Location:
    Melbourne, Australia
    cPanel Access Level:
    Root Administrator
    That's 41.8 PERCENT of your CPU, not a load of 41, which is actually fairly normal. If it sits there all the time you may want to investigate whats using the CPU time, but it's not unduly high.
     
Loading...

Share This Page