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.

Mysql, "Operation Not Supported" Endless loop and 100% CPU usage

Discussion in 'General Discussion' started by cam94z28, Nov 19, 2008.

  1. cam94z28

    cam94z28 Member

    Joined:
    Aug 10, 2006
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    I have a quad core Xeon X3220 with 4GB RAM, running CentOS. I was originally running STABLE tree and mysql 5.0.51a, and now I am running RELEASE tree, and 5.0.67. I was hoping this would help, but it made no difference.
    I have only recently started receiving decent traffic. It was at this point that I started noticing that MySQL is always using 100%+ of cpu. With only 5 or more simultaneous actual SQL processes, this jumps to 250-300% CPU, and loads will be above 7.00. Atleast 4-5 times a day, during prime time I receive CPU overload warning emails, and http failed notices (from my server ISP) at around the same time. Once the load recovers everything comes back. I was logged in earlier today during one of these spikes, and observed a load average of 198.00!

    Upon doing an strace of the mysqld pid I was greeted with the following:
    Code:
    Process 26817 attached - interrupt to quit
    select(13, [10 12], NULL, NULL, NULL)   = 1 (in [12])
    fcntl64(12, F_SETFL, O_RDWR|O_NONBLOCK) = 0
    accept(12, {sa_family=AF_FILE, path="Û¿"}, [2]) = 17
    fcntl64(12, F_SETFL, O_RDWR)            = 0
    getsockname(17, {sa_family=AF_FILE, path="/var/lib/mysql"}, [28]) = 0
    fcntl64(17, F_SETFL, O_RDONLY)          = 0
    fcntl64(17, F_GETFL)                    = 0x2 (flags O_RDWR)
    fcntl64(17, F_SETFL, O_RDWR|O_NONBLOCK) = 0
    setsockopt(17, SOL_IP, IP_TOS, [8], 4)  = -1 EOPNOTSUPP (Operation not supported)
    time(NULL)                              = 1227093200
    clone(child_stack=0xa2f774b4, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0xa2f77bd8, {entry_number:6, base_addr:0xa2f77b90, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}, child_tidptr=0xa2f77bd8) = 8017
    After doing a trace of a corresponding httpd process I get the following:
    Code:
    Process 27095 attached - interrupt to quit
    select(0, NULL, NULL, NULL, {0, 752000}) = 0 (Timeout)
    waitpid(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], WNOHANG|WSTOPPED) = 2886
    gettimeofday({1227091797, 454806}, NULL) = 0
    waitpid(-1, 0xbfc967c8, WNOHANG|WSTOPPED) = 0
    select(0, NULL, NULL, NULL, {1, 0})     = 0 (Timeout)
    write(6, "!", 1)                        = 1
    socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 43
    fcntl64(43, F_GETFL)                    = 0x2 (flags O_RDWR)
    fcntl64(43, F_SETFL, O_RDWR|O_NONBLOCK) = 0
    connect(43, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EINPROGRESS (Operation now in progress)
    poll([{fd=43, events=POLLOUT, revents=POLLOUT}], 1, 3000) = 1
    getsockopt(43, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
    write(43, "OPTIONS * HTTP/1.0\r\nUser-Agent: "..., 165) = 165
    close(43)                               = 0
    waitpid(-1, 0xbfc967c8, WNOHANG|WSTOPPED) = 0
    select(0, NULL, NULL, NULL, {1, 0})     = ? ERESTARTNOHAND (To be restarted)
    --- SIGCHLD (Child exited) @ 0 (0) ---
    The above errors repeat indefinitely and I believe are driving my cpu loads to unacceptable levels. Any help would be greatly appreciated.
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Not an exact science, but have a peek at the CPU/Memory/MySQL Usage page, under the Server Status section of WHM and see which account is lighting up red there. You can go back days on that page.

    Not sure if that'll help, but if an account name is listed, a file/script on it might be listed as well. Could be some out of date/poorly coded script or something else along those lines.
     
Loading...

Share This Page