Hi all:
I have faced with a sudden problem like this when in my webpage its showing lots of mysql_connect warnings and when I did ps -aux then it shows lots and lots of thses below:-
Code:
mysql 32762 1.1 1.7 92324 36860 ? D 11:45 0:07 /usr/local/mysql/bin/mysqld --defaults-extra-file=/usr/local/mysql/data/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=/usr/local/mysql/data/career.pid --skip-locking
mysql 32763 1.0 1.7 92324 36860 ? D 11:45 0:06 /usr/local/mysql/bin/mysqld --defaults-extra-file=/usr/local/mysql/data/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=/usr/local/mysql/data/career.pid --skip-locking
mysql 32764 1.2 1.7 92324 36860 ? D 11:45 0:07 /usr/local/mysql/bin/mysqld --defaults-extra-file=/usr/local/mysql/data/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=/usr/local/mysql/data/career.pid --skip-locking
mysql 32765 1.0 1.7 92324 36860 ? D 11:45 0:06 /usr/local/mysql/bin/mysqld --defaults-extra-file=/usr/local/mysql/data/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=/usr/local/mysql/data/career.pid --skip-locking
mysql 32766 1.0 1.7 92324 36860 ? D 11:45 0:06 /usr/local/mysql/bin/mysqld --defaults-extra-file=/usr/local/mysql/data/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=/usr/local/mysql/data/career.pid --skip-locking
mysql 32767 1.1 1.7 92324 36860 ? D 11:45 0:07 /usr/local/mysql/bin/mysqld --defaults-extra-file=/usr/local/mysql/data/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=/usr/local/mysql/data/career.pid --skip-locking
mysql 300 1.0 1.7 92324 36860 ? D 11:45 0:06 /usr/local/mysql/bin/mysqld --defaults-extra-file=/usr/local/mysql/data/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=/usr/local/mysql/data/career.pid --skip-locking
mysql 301 1.0 1.7 92324 36860 ? D 11:45 0:06 /usr/local/mysql/bin/mysqld --defaults-extra-file=/usr/local/mysql/data/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=/usr/local/mysql/data/career.pid --skip-locking
mysql 302 1.0 1.7 92324 36860 ? D 11:45 0:06 /usr/local/mysql/bin/mysqld --defaults-extra-file=/usr/local/mysql/data/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=/usr/local/mysql/data/career.pid --skip-locking
And 7/8 of these , which it normally shows when everything is ok about mysql
Code:
mysql 1172 0.0 0.6 32796 13388 pts/1 S 11:59 0:00 /usr/local/mysql/bin/mysqld --defaults-extra-file=/usr/local/mysql/data/my.cnf --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --user=mysql --pid-file=/usr/local/mysql/data/career.pid --skip-locking
Now when I gave the command
# service mysqld restart
It was giving an error about a .pid file. Even it doesn't allowing to kill the mysql porcesses with killall command.
So after giving 2 time the kill command then it became in the position to accept this command
# Service mysqld restart
After that it was ok.
Anyone have any idea why this was happening all of a sudden. Also it happened another time before but still I didn't find out where is the problem.
You will notice that the problematic lines of mysql shows status 'D' but normal ones shows 'S' there.
The PROCESS STATE CODES
D uninterruptible sleep (usually IO)
R runnable (on run queue)
S sleeping
T traced or stopped
Z a defunct ("zombie") process
Anybody ever faced this before as I have to pinpoint the source of this because it can happen again and then users cant even login in the website.
Thanks in advance. Waiting for reply.