The MU forums have moved to WordPress.org

Server is going crazy! Mysql usage is killing it (16 posts)

  1. Konstan
    Member
    Posted 15 years ago #

    Usually my server load is below 2, but last night it shot up to like 10. Today I woke up and I saw it at 20-30. Myslq usage is taking up everything, if I turn off the mysqld everything does back to 0.

    I checked http connections and they are very low, so its not a ddos attack I think.

    I havent done anything to any file in the last week, and this started last night out of nowhere. What can be causing this? I dont see anything weird in the error logs?

    Using mu1.3:

    16508 mysql 20 0 1024m 112m 4112 S 155 5.6 6:56.65 mysqld

  2. theapparatus
    Member
    Posted 15 years ago #

    - Do you have a large number of html connections to the server currently?

    - Is anything else occuring that would be affecting mysql?

    - Any file or object cache installed and running?

  3. Konstan
    Member
    Posted 15 years ago #

    - Html connections normal
    - Nothing, I only have 1 cron script that runs at night. Nothing else on the domain other then wpmu
    - Zend?

    Is the user mysqld supposed to run all the time? All others are up for a fraction of time, but this user doesnt stop. CPU usage for mysqld goes up to 199% :S

  4. dbasulto
    Member
    Posted 15 years ago #

    perhaps this is due to your site wide tags solution you commented on another thread?

  5. andrea_r
    Moderator
    Posted 15 years ago #

    That would certainly do it.

    "I havent done anything to any file in the last week,"

    What was the last plugin you installed?

  6. myusufe
    Member
    Posted 15 years ago #

  7. Konstan
    Member
    Posted 15 years ago #

    I had already tuned mysql...it worked fine for 2 months. I was getting 7-10k unique hits a day and server loads would be at most at 1.00

    Yesterday for no apparent reason it shot up to 10, getting up to 30 today. Its at 2-3 now. I've checked my hits and nothing has changed, no error logs, access logs look normal.

    I am not using any tag solutions, havent done anything. The last file I uploaded was simple trackback validation, but I deleted it and let the server run for a while and nothing changed, loads were still crazy high.

  8. SteveAtty
    Member
    Posted 15 years ago #

    Have you optimized your database recently?

  9. Konstan
    Member
    Posted 15 years ago #

    Thats the cron script ;)

    It runs daily, at like 2 am when the traffic is at its lowest. It optimizes the database.

  10. SteveAtty
    Member
    Posted 15 years ago #

    Might be silly but have you tried shutting mysql down and restarting it?

  11. Konstan
    Member
    Posted 15 years ago #

    Yes.

  12. andrea_r
    Moderator
    Posted 15 years ago #

    - what plugins are you running?
    - are you getting a lot of spam?
    - how much memory do you have available?

  13. Konstan
    Member
    Posted 15 years ago #

    In mu-plugins:

    - custom anti spam (ver 2.82)
    - google-analitycs.php (little something I wrote to insert the google code into footer of the pages)
    - signup question
    - simple-trackback-validation (ver 2.1)
    - widget widgetbox
    - wpvideo
    - sync-taxonomy (was there, should I remove it since I dont think I am using that?)

    In plugins:

    - Sociable
    - wp-slimstat

    Spam is as usual, have seen no increase. And my server has 2gb memory.

  14. lunabyte
    Member
    Posted 15 years ago #

    I can't remember the name of it off the top of my head, but mysql is supposed to keep a log of queries that are resource intensive (or something along those lines).

    If it's available, it may have some information that is useful.

    Aside from that, check dates to make sure there aren't any files that have been updated recently (like from a hacker or something), and also check to see if there were any updates to any software packages on your server that could have possibly caused a conflict.

    I've seen it happen on occasion with auto-updates (like from the RHN, or similar) where something was updated and caused a conflict.

  15. Konstan
    Member
    Posted 14 years ago #

    I'll see if I can find that log since the server is doing this again right now. I dont know what the hell.

  16. theapparatus
    Member
    Posted 14 years ago #

    I believe Luna is talking about the variable log-slow-queries that one can set within one's my.cnf file.

    You can find details here:

    http://dev.mysql.com/doc/refman/5.0/en/log-files.html

About this Topic

  • Started 15 years ago by Konstan
  • Latest reply from theapparatus