Skip to main content

High MySQL and server load. Optimization Request

Comments

5 comments

  • cPanelMichael
    Hello :) You may also want to run a command such as "mysqladmin processlist" to see which databases are using up the most CPU when the server load is high. Thank you.
    0
  • seemans
    Hello :) You may also want to run a command such as "mysqladmin processlist" to see which databases are using up the most CPU when the server load is high. Thank you.

    Hi, There is one site on the server, and only one database there.
    0
  • cPanelMichael
    The following thread may help if you want to ensure it's MySQL resulting in the high load: Troubleshooting high server loads on Linux servers Otherwise, you may want to consult with a qualified system administrator if you don't receive additional user-feedback to this thread. Thank you.
    0
  • seemans
    I found lots of `Waiting for table level lock` by checking `SHOW FULL PROCESSLIST; and this causes stop responding new mysql query, and the number of processes of the server goes spike. Changing any values on my.cnf in any way didn`t solve this. It still comes up and keep there for a while suddenly again and again and kill my server. Please advise what to do.. how to prevent this lock status.. I don`t know what causes this.
    MariaDB [(none)]> SHOW FULL PROCESSLIST; Waiting for table level lock | update products set products_ordered = products_ordered + 1 where products_id = '11174' Waiting for table level lock | select distinct p.products_id, pd.products_name, p.products_image from products p, products_description pd left join products_details pdt on pd.products_id = pdt.products_id where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '4' order by p.products_ordered desc, pd.products_name limit 100 Waiting for table level lock | select p.products_id, pd.products_name, p.products_model, p.products_price, p.products_weight, p.products_tax_class_id from products p, products_description pd where p.products_id='17406' and pd.products_id = p.products_id and pd.language_id = '4' Waiting for table level lock | select p.products_id, pd.products_name, p.products_model, p.products_price, p.products_weight, p.products_tax_class_id from products p, products_description pd where p.products_id='20115' and pd.products_id = p.products_id and pd.language_id = '4' Waiting for table level lock | select distinct p.products_id, pd.products_name, p.products_image from products p, products_description pd left join products_details pdt on pd.products_id = pdt.products_id where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '4' order by p.products_ordered desc, pd.products_name limit 100 # current value of : /etc/my.cnf (some lines added to default cpanel setting) [mysqld] default-storage-engine=MyISAM innodb_file_per_table=1 max_allowed_packet=268435456 open_files_limit=10000 max_connections=300 thread_cache_size=256 tmp_table_size=256M max_heap_table_size=256M table_open_cache=2500
    0
  • cPanelMichael
    You may want to try repairing and optimizing the database to see if that makes a difference: mysqlcheck Thank you.
    0

Please sign in to leave a comment.