SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Guru dragonhawk's Avatar
    Join Date
    Apr 2002
    Location
    Melbourne
    Posts
    707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    MySQL taking up a lot of CPU

    Is it normal for mysqld to run for 500+ minutes and taking up around 50% CPU? When it reached 500 minutes, I restarted mysqld and that took the load off for a while. But it looks like it's building up again...

    Problem with MySQL? or just too many connections to the database? (since I have a lot of fairly high traffic sites on the server all powered by MySQL).

  2. #2
    SitePoint Enthusiast
    Join Date
    May 2005
    Location
    Wonderful Malaysia
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    for me it's not normal....

    may be you should try master-slave for your mysql server...
    'Only Paranoid Will Survived'

  3. #3
    SitePoint Guru dragonhawk's Avatar
    Join Date
    Apr 2002
    Location
    Melbourne
    Posts
    707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    master slave? what's that?

  4. #4
    SitePoint Enthusiast
    Join Date
    May 2005
    Location
    Wonderful Malaysia
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    'Only Paranoid Will Survived'

  5. #5
    SitePoint Member
    Join Date
    Aug 2005
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i had this problem because my script was badly written. after i rewrote my script, memory and CPU usage went back to normal.

  6. #6
    SitePoint Guru dragonhawk's Avatar
    Join Date
    Apr 2002
    Location
    Melbourne
    Posts
    707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What was "bad" about it? Maybe it's an easy fix on my part

  7. #7
    SitePoint Guru
    Join Date
    Nov 2004
    Location
    Plano
    Posts
    643
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well i dont remember exactly, but there was a variable that i had set that kept getting larger and larger...and eventually it filled up the memory...and the CPU.

    it actually wasn't a "bad query", but bad programming. nevertheless it caused my CPU to shoot up everytime it ran (3 times a week on a cron) until it actually crashed mysql.

    blayne


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •