Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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
    
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 Apr 27 '12 at 16:35
    
thnx, I have added some more info. –  Momo Apr 27 '12 at 16:45
    
n/p. Please click the edit link to see how you can format a question for readability. –  kaiser Apr 27 '12 at 16:47

1 Answer 1

up vote 0 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.