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
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,
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
does anyone know what is going on or why it is acting this way,,
please advise me
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!
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.
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.