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


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 ?


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

    max_connections = 250
    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
    max_allowed_packet = 16M
    key_buffer = 80M
    sort_buffer_size = 64M
    read_buffer = 2M
    write_buffer = 2M
    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

  • 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
  • 1
    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

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


Let me know how it goes. Thanks

  • @momo Have you tried these suggestions in your my.cnf [mysqld] section? Would require stop/start to become effective, unless you know how to SET GLOBAL variable-name=value; for these Dynamic variables. – Wilson Hauck Mar 23 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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