SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2002
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mySQL crashing my site

    i don't know what is going on,, but mySQL is acting weird, i had to restart my server today just to get out of one mysql, this is how it looks like

    Code:
      PID USER	 PRI  NI  SIZE  RSS SHARE STAT %CPU %MEM   TIME CPU COMMAND
      2020 mysql	 23   0  6416 4872  1512 S	14.9  0.4  12:18   0 mysqld
    if you look at the time you will see that the number is 12:18, this number will keep on increasing and increasing and increasing,, i mean this looks weird,
    does anyone know what is going on or why it is acting this way,,

    please advise me

  2. #2
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    the time will keep increasing becaue, unlike other programs that use inetd, mysql runs continously. don't kill it just because its in your process list; it's supposed to be there!

  3. #3
    SitePoint Zealot
    Join Date
    Jul 2004
    Location
    US
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If I'm not mistaken, MySQL forks multiple child processes to handle each connection. I believe when you start MySQL initially it'll automatically spawn a few additional processes right off the bat.

    Anyway, if you have what appears to be a bunch of MySQL processes running simultaneously and one is using excessive mem/cpu for an extended period of time, chances are that particular process went nuts so killing it is fine.

    As for why it happens, I'm not sure. But if you killed it off this time and it doesn't seem to happen again, it could have just been a one-time random thing.
    webmaster at zeroweb dot org
    Free webmaster stuff | URL shortener | Free web graphics

  4. #4
    reads the ********* Crier silver trophybronze trophy longneck's Avatar
    Join Date
    Feb 2004
    Location
    Tampa, FL (US)
    Posts
    9,854
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    ah, good point zero. i would take zero's advice one set further: before simply killing of random mysql processes, you need to find out what that process is doing. execute the command SHOW PROCESS LIST as a query to see. if you kill off a thread that is writing to a table, you run the risk of corrupting a table.


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
  •