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 high cpu usage issue

Discussion in 'Workarounds and Optimization' started by Ahmed Hany, May 5, 2016.

  1. Ahmed Hany

    Ahmed Hany Member

    Joined:
    Apr 8, 2016
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Egypt
    cPanel Access Level:
    Root Administrator
    Hi,

    I have a wordpress website that have 200 unique visitors on the same time or more , i can't believe that only 200 online visitors can cause this high cpu !


    anyone help me to resolve this problem !

    Thanks in advanced
     
  2. Ahmed Hany

    Ahmed Hany Member

    Joined:
    Apr 8, 2016
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Egypt
    cPanel Access Level:
    Root Administrator
    I ran this command ( mysqladmin processlist ) and i received the following:

    Code:
     root@server [/]# mysqladmin processlist
    -bash: root@server: command not found
    root@server [/]# +-------+----------------+-----------+----------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+----------+
    -bash: +-------+----------------+-----------+----------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+----------+: command not found
    root@server [/]# | Id  | User  | Host  | db  | Command | Time | State  | Info  | Progress |
    -bash: syntax error near unexpected token `|'
    root@server [/]# +-------+----------------+-----------+----------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+----------+
    -bash: +-------+----------------+-----------+----------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+----------+: command not found
    root@server [/]# | 7897  | eximstats  | localhost | eximstats  | Sleep  | 961  |  |  | 0.000  |
    -bash: syntax error near unexpected token `|'
    root@server [/]# | 59073 | meshmomk_wp752 | localhost | meshmomk_wp752 | Query  | 0  | query end  | INSERT INTO `wphl_postmeta` (`post_id`, `meta_key`, `meta_value`) VALUES (11005, '_wpweb_select_hour | 0.000  |
    -bash: syntax error near unexpected token `|'
    root@server [/]# | 59245 | meshmomk_wp752 | localhost | meshmomk_wp752 | Sleep  | 0  |  |  | 0.000  |
    -bash: syntax error near unexpected token `|'
    root@server [/]# | 59247 | meshmomk_wp752 | localhost | meshmomk_wp752 | Query  | 0  | query end  | DELETE FROM `wphl_postmeta` WHERE `meta_id` = 61273  | 0.000  |
    -bash: syntax error near unexpected token `|'
    root@server [/]# | 59248 | meshmomk_wp752 | localhost | meshmomk_wp752 | Query  | 0  | Sending data | SELECT wphl_posts.* FROM wphl_posts WHERE ID IN (10992,10989,10988,10987,10985,10983)  | 0.000  |
    -bash: syntax error near unexpected token `|'
    root@server [/]# | 59252 | meshmomk_wp752 | localhost | meshmomk_wp752 | Sleep  | 0  |  |  | 0.000  |
    -bash: syntax error near unexpected token `|'
    root@server [/]# | 59253 | meshmomk_wp752 | localhost | meshmomk_wp752 | Query  | 0  | query end  | UPDATE `wphl_postmeta` SET `meta_value` = '1316' WHERE `post_id` = 10733 AND `meta_key` = 'tie_views | 0.000  |
    -bash: syntax error near unexpected token `|'
    root@server [/]# | 59254 | meshmomk_wp752 | localhost | meshmomk_wp752 | Query  | 0  | query end  | UPDATE `wphl_postmeta` SET `meta_value` = '31249' WHERE `post_id` = 1124 AND `meta_key` = 'tie_views | 0.000  |
    -bash: syntax error near unexpected token `|'
    root@server [/]# | 59255 | meshmomk_wp752 | localhost | meshmomk_wp752 | Sleep  | 0  |  |  | 0.000  |
    -bash: syntax error near unexpected token `|'
    root@server [/]# | 59256 | meshmomk_wp752 | localhost | meshmomk_wp752 | Sleep  | 0  |  |  | 0.000  |
    -bash: syntax error near unexpected token `|'
    root@server [/]# | 59257 | meshmomk_wp752 | localhost | meshmomk_wp752 | Sleep  | 0  |  |  | 0.000  |
    -bash: syntax error near unexpected token `|'
    root@server [/]# | 59258 | root  | localhost |  | Query  | 0  | init  | show processlist  | 0.000  |
    -bash: syntax error near unexpected token `|'
    root@server [/]# +-------+----------------+-----------+----------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+----------+
    -bash: +-------+----------------+-----------+----------------+---------+------+--------------+------------------------------------------------------------------------------------------------------+----------+:
    Any help it would be appreciated
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  4. Znuff

    Znuff Member

    Joined:
    May 17, 2016
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Romania
    cPanel Access Level:
    DataCenter Provider
    Use
    Code:
    mytop -d ''
    to see real time MySQL usage.

    mytop comes by default with mariadb, otherwise you will have to install it manually (yum install mytop) if you are still on mysql
     
Loading...

Share This Page