Friday, 17 January 2014

MySQL vs Killed Session

Most of time, I'm used to installing and testing every new MySQL instance and every now and again I execute a Cartesian product between two tables to try out the performance of the instance.

Following you'll find what cropped up !

mysql> select * from payment a, payment b;

After a while the mysql client was closed by an unknown process and what's more I got only the message : "killed"

Immediately I looked at the log of the database but nothing was written.

At first glance it didn't seem to be a database problem and I've been thinking about it for a while.

Suddenly I had an Idea !

Would it help if I looked at the log of the linux server ? It may !

At the end of the /var/log/messages I found the following error :

Jan 15 15:31:54 MysqlVm01 kernel: mysqld cpuset=/ mems_allowed=0
Jan 15 15:31:54 MysqlVm01 kernel: Pid: 2041, comm: mysqld Not tainted 2.6.39-400.17.1.el6uek.x86_64 Jan 15 15:31:55 MysqlVm01 kernel: Out of memory: Kill process 7236 (mysql) score 937 or sacrifice child
Jan 15 15:31:55 MysqlVm01 kernel: Killed process 7236 (mysql) total-vm:10779428kB,



The server ran out of memory and because of that the kernel agent process decided to sacrifice a single client process to shutdown the entire server machine.


That was the problem.

See you in my next blog.

Byeeee


No comments:

Post a Comment