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.

SOLVED Strange "MySQL" error that consumes my entire CPU

Discussion in 'Database Discussions' started by Husseincak, Mar 16, 2017.

  1. Husseincak

    Husseincak Registered

    Joined:
    Mar 16, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Spain
    cPanel Access Level:
    DataCenter Provider
    Hello guys,

    I have been observing for a long time this error that consumes almost all my CPU:

    Code:
    /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --log-error=/var/lib/mysql/***.***.***.err --open-files-limit=10000 --pid-file=/var/lib/mysql/***.***.***.pid
    Here is a screenshot of what I'm talking about: 544,98%. I understand this data is not real but if you see the third screenshoot, you can see that this process is consuming 64% to 90% of the CPU of the server.

    - Removed -

    When I trace the task, it show me this error in in loop every 5 second or so.

    Code:
    fcntl(17, F_GETFL)                      = 0x2 (flags O_RDWR)
    fcntl(17, F_SETFL, O_RDWR|O_NONBLOCK)   = 0
    accept(17, {sa_family=AF_LOCAL, NULL}, [2]) = 52
    fcntl(17, F_SETFL, O_RDWR)              = 0
    getsockname(52, {sa_family=AF_LOCAL, sun_path="/var/lib/mysql/mysql.sock"}, [28]) = 0
    fcntl(52, F_SETFL, O_RDONLY)            = 0
    fcntl(52, F_GETFL)                      = 0x2 (flags O_RDWR)
    setsockopt(52, SOL_SOCKET, SO_RCVTIMEO, "\36\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0
    setsockopt(52, SOL_SOCKET, SO_SNDTIMEO, "<\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0
    fcntl(52, F_SETFL, O_RDWR|O_NONBLOCK)   = 0
    setsockopt(52, SOL_IP, IP_TOS, [8], 4)  = -1 EOPNOTSUPP (Operation not supported)
    clone(child_stack=0x6c8da13e5fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x6c8da13e69d0, tls=0x6c8da13e6700, child_tidptr=0x6c8da13e69d0) = 22015
    poll([{fd=15, events=POLLIN}, {fd=17, events=POLLIN}], 2, 4294967295) = 1 ([{fd=17, revents=POLLIN}])
    fcntl(17, F_GETFL)                      = 0x2 (flags O_RDWR)
    fcntl(17, F_SETFL, O_RDWR|O_NONBLOCK)   = 0
    accept(17, {sa_family=AF_LOCAL, NULL}, [2]) = 153
    fcntl(17, F_SETFL, O_RDWR)              = 0
    getsockname(153, {sa_family=AF_LOCAL, sun_path="/var/lib/mysql/mysql.sock"}, [28]) = 0
    fcntl(153, F_SETFL, O_RDONLY)           = 0
    fcntl(153, F_GETFL)                     = 0x2 (flags O_RDWR)
    setsockopt(153, SOL_SOCKET, SO_RCVTIMEO, "\36\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0
    setsockopt(153, SOL_SOCKET, SO_SNDTIMEO, "<\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16) = 0
    fcntl(153, F_SETFL, O_RDWR|O_NONBLOCK)  = 0
    setsockopt(153, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not supported)
    clone(child_stack=0x6c8da1048fb0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x6c8da10499d0, tls=0x6c8da1049700, child_tidptr=0x6c8da10499d0) = 22018
    poll([{fd=15, events=POLLIN}, {fd=17, events=POLLIN}], 2, 4294967295) = 1 ([{fd=17, revents=POLLIN}])
    I can't know what its happening because I don't have to much knowing about servers stuff.

    Can you help me please?
     
    #1 Husseincak, Mar 16, 2017
    Last edited by a moderator: Mar 17, 2017
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,980
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    That's your MySQL process. You can run a command such as "mysqladmin processlist" to see a list of MySQL's top processes to help determine the reason it's using high amounts of CPU.

    Thank you.
     
    Husseincak likes this.
  3. Husseincak

    Husseincak Registered

    Joined:
    Mar 16, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Spain
    cPanel Access Level:
    DataCenter Provider
    Hello @cPanelMichael,
    Thanks for your quickly response. This is what the server show me when I run the command you told me. But Is not nothing than can slow the server so much...
    [Removed - Please exclude real domain name and account data from the output]
     
    #3 Husseincak, Mar 16, 2017
    Last edited by a moderator: Mar 16, 2017
  4. Husseincak

    Husseincak Registered

    Joined:
    Mar 16, 2017
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Spain
    cPanel Access Level:
    DataCenter Provider
    Thanks for your help michael, I discover with your help the user that had the error and I were able to fix the problem. I checked the database size and i discover that user had more than 10millions of revisions of wordpress post and i help him to delete all the revisions.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,980
    Likes Received:
    1,275
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    I'm happy to see you were able to address the issue. Thank you for updating us with the outcome.
     
Loading...

Share This Page