mysql - Site not responding error - taking long to load

admin2025-06-02  3

Closed. This question is off-topic. It is not currently accepting answers.

Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?

Closed 5 years ago.

Improve this question

I have a wordpress website which gets around 20K visits a days and with around 7pages/visit and 62 hits per visit.

My server is :

8 processors --> Intel(R) Xeon(R) CPU E5405 @ 2.00GHz

8 GB RAM

Now my users are complaining about that the site takes time to load sometimes and craches giving the taking too long to load and it also happened to me a couple of times wher i thought it was my connection.

From previous issues I know that there is a query that sometimes take too long and the site was crashing from it. I then tweaked the server and changed the query_cach_size (because on days with traffic spike the site was stopping alot) in the myf file into 256MB and after that the site stopped the errors on busy days but started giving this kind of error.

Any ideas ? How can I monitor my site and see when it goes down and what is causing it to troubleshoot this ?


EDIT:

  1. I am using a dedicated server.
  2. The myf file looks like:

    [mysqld]
    max_connections = 250
    safe-show-database
    skip-locking
    key_buffer = 128M
    max_allowed_packet = 24M
    table_cache = 700
    sort_buffer_size = 16M
    read_buffer_size = 8M
    read_rnd_buffer_size = 16M
    myisam_sort_buffer_size = 64M
    query_cache_size = 128M
    max_heap_table_size = 180M
    tmp_table_size = 180M
    thread_cache_size = 16
    wait_timeout = 45
    interactive_timeout = 600
    skip-name-resolve
    skip-innodb
    
    [mysqldump]
    quick
    max_allowed_packet = 16M
    
    [mysql]
    no-auto-rehash
    
    [isamchk]
    key_buffer = 80M
    sort_buffer_size = 64M
    read_buffer = 2M
    write_buffer = 2M
    
    [myisamchk]
    key_buffer = 80M
    sort_buffer_size = 64M
    read_buffer = 2M
    write_buffer = 2M
    
  3. The site will stop responding sometime when I click on any hyperlink (post, page just anything that requires action).

Thank you

Closed. This question is off-topic. It is not currently accepting answers.

Questions that are too localized (such as syntax errors, code with restricted access, hacked sites, hosting or support issues) are not in scope. See how do I ask a good question?

Closed 5 years ago.

Improve this question

I have a wordpress website which gets around 20K visits a days and with around 7pages/visit and 62 hits per visit.

My server is :

8 processors --> Intel(R) Xeon(R) CPU E5405 @ 2.00GHz

8 GB RAM

Now my users are complaining about that the site takes time to load sometimes and craches giving the taking too long to load and it also happened to me a couple of times wher i thought it was my connection.

From previous issues I know that there is a query that sometimes take too long and the site was crashing from it. I then tweaked the server and changed the query_cach_size (because on days with traffic spike the site was stopping alot) in the my.cnf file into 256MB and after that the site stopped the errors on busy days but started giving this kind of error.

Any ideas ? How can I monitor my site and see when it goes down and what is causing it to troubleshoot this ?


EDIT:

  1. I am using a dedicated server.
  2. The my.cnf file looks like:

    [mysqld]
    max_connections = 250
    safe-show-database
    skip-locking
    key_buffer = 128M
    max_allowed_packet = 24M
    table_cache = 700
    sort_buffer_size = 16M
    read_buffer_size = 8M
    read_rnd_buffer_size = 16M
    myisam_sort_buffer_size = 64M
    query_cache_size = 128M
    max_heap_table_size = 180M
    tmp_table_size = 180M
    thread_cache_size = 16
    wait_timeout = 45
    interactive_timeout = 600
    skip-name-resolve
    skip-innodb
    
    [mysqldump]
    quick
    max_allowed_packet = 16M
    
    [mysql]
    no-auto-rehash
    
    [isamchk]
    key_buffer = 80M
    sort_buffer_size = 64M
    read_buffer = 2M
    write_buffer = 2M
    
    [myisamchk]
    key_buffer = 80M
    sort_buffer_size = 64M
    read_buffer = 2M
    write_buffer = 2M
    
  3. The site will stop responding sometime when I click on any hyperlink (post, page just anything that requires action).

Thank you

Share Improve this question edited Apr 27, 2012 at 16:47 kaiser 51k27 gold badges151 silver badges245 bronze badges asked Apr 27, 2012 at 16:27 MomoMomo 1134 bronze badges 3
  • I feel the Q is off topic. But: Can you extend your Q (edit) with what you´re using for caching, minify, etc.? Also: VPS, shared host (I guess first?) and some in depth about your queries. On which page is it stopping (if you can hunt that one down) and what´s the exact query? There´s a debug plugin and a query extension that could be useful (search repo). – kaiser Commented Apr 27, 2012 at 16:35
  • 1 thnx, I have added some more info. – Momo Commented Apr 27, 2012 at 16:45
  • n/p. Please click the edit link to see how you can format a question for readability. – kaiser Commented Apr 27, 2012 at 16:47
Add a comment  | 

2 Answers 2

Reset to default 0

You shouldn't be blindly changing configs in my.cnf.

Use rackerhacker/MySQLTuner-perl · GitHub to test and check your my.cnf configs. It will give suggestions for memory allocations and all other aspects of MySQL tuning.

You also should configure httpd.conf for high loads. See Apache Performance Tuning - Apache HTTP Server

Suggestions for your my.cnf [mysqld] section

read_buffer_size=256K
read_rnd_buffer_size=256K
thread_cache_size=250

Let me know how it goes. Thanks

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1748866678a314376.html

最新回复(0)