logo

$24
WPMU keeps crashing

I am dealing with a big WPMU site. More than 10,000 users. It sits on a dedicated linux server runninng ubuntu, with 2 gigs of RAM. MySql 5.0.

The site keeps crashing. It looks like the MySql tables themselves keep locking up. Is this common? I have to ssh to the server and kill mysql and then restart it. Then everything is fine. The spikes in traffic seem to be doing something to MySql?

Have others had this problem? How to handle it?

viper | 05/18/10 at 11:05pm | Edit


(4) Possible Answers Submitted...

  • avatar
    Last edited:
    05/20/10
    7:42pm
    Oleg Butuzov says:

    same as with other sites... debuging, profiling...

    1)
    wp-config.php

    if ($_COOKIE['DEVELOPER']){
    define('WP_DEBUG', true);
    }


    2) make a query log... look on it ...

    3) what tables? innoDB? MyIsam ?
    how much reads / writes? whats with hdd?
    http://dev.mysql.com/doc/refman/5.0/en/innodb-configuration.html

    4) what size of db? what file system?...

    everything important.
    wish you luck man, i know its hard situation.

    Previous versions of this answer: 05/18/10 at 11:16pm | 05/18/10 at 11:16pm

    • 05/19/10 1:15pm

      viper says:

      Everything in wordpress is MyIsam, right?

      Starting logging now, thanks. Will gather data.

      What patterns should I look for?

    • 05/19/10 1:34pm

      Oleg Butuzov says:

      innodb that a tables by default =). on my projects where most reads that writes i making myisam tables. since foreign key not used it works pretty well and even better that innodb.

      patterns? everything that ends with a crash.

      http://dev.mysql.com/doc/administrator/en/mysql-administrator-server-logs-slow-log.html

      http://www.mydigitallife.info/2007/01/22/enable-logging-of-slow-queries-slow-query-log-in-mysql-database/

      http://www.mydigitallife.info/2007/01/23/change-or-set-mysql-long-query-time-value-for-log-slow-queries/

      http://www.mydigitallife.info/2010/01/26/optimize-and-increase-mysql-responsiveness-and-performance-with-max_write_lock_count/

    • 05/19/10 1:36pm

      Oleg Butuzov says:

      Just info (thats bad that i can't comment your and Jarret tread) . Take also look to the eAccelerator (this is to make php faster not MySQL). also here is good book for making MySQL better "MySQL performance" by guys from Percoona...

    • 05/19/10 2:40pm

      viper says:

      So it helps to change InnoDb to myisam tables?

  • avatar
    Last edited:
    05/18/10
    11:16pm
    Monster Coder says:

    can you kindly provide the link. you may give in private. i want to see what error it is showing. may be tuning mysql needed.

    • 05/18/10 11:45pm

      viper says:

      When I look in phpMyAdmin, I get errors, or it does not load, or sometimes I look at web pages in browser and errors on page say "table wp_posts locked" or something about row locks. It is not happening now.

      What kind of MySql tuning do you suggest?

  • avatar
    Last edited:
    05/19/10
    5:55am
    Buzu B says:

    The info you provide is really not enough to identify the problem, but you could read on this post:

    http://paulstamatiou.com/how-to-quickie-repair-mysql-tables-in-phpmyadmin

    This can be useful. I would suggest following the tips there even if they aren't the solution to this particular problem. Having a Database is like having a car, you need to maintain it to ensure it will run well. Keep your Databases healthy.

    • 05/19/10 1:18pm

      viper says:

      That is good tip. but i want more to know how to avoid crashes, instead of recover from them afterwards

  • avatar
    Last edited:
    05/20/10
    7:42pm
    Jarret Minkler says:

    Perhaps applying the caching plugins would give you some lift, and keep queries out of the database aas much as possible. Also, do you know if you have access to APC on your server?

    Also see if you can get this written into your /etc/my.cnf file

    max_write_lock_count = 1

    as explained here http://blog.taragana.com/index.php/archive/one-mysql-configuration-tip-that-can-dramatically-improve-mysql-performance/, since WP in not InnoDB

    Previous versions of this answer: 05/19/10 at 8:04am | 05/19/10 at 8:08am

    • 05/19/10 1:14pm

      viper says:

      I can write to /etc/my.cnf. i will try this tip.

    • 05/20/10 10:15am

      Jarret Minkler says:

      Any luck?

This question has expired.





Current status of this question: Completed