0

I have a 64GB memory machine, and I set mysql buffer pool to be 40GB. So MySQL is using up to 40G memory while it's running.

I kicked off a java application that requires more than 20GB memory, so the java application starts to consume more and more memory and eventually the total 64G memory is not enough for both java and mysql.

Now, the interesting problem shows: mysql crashed (see graph here). But to my understand, shouldn't mysql stays the same, and instead Java crashes? Since the 40G memory is already allocated to mysql, the java application shouldn't take it away right?

Thank you

1 Answer 1

1

If you check kernel log, you should see OoM Killed messages.. Kernel will usually kill the largest offender which is MySQL in ourcase.

5
  • 1
    Indeed. Usually mysql is not "crashing" but rather is being killed. dba.stackexchange.com/a/25083/11651 When this happens, it will try to restart itself, and usually will fail because all of the configured memory for the InnoDB buffer pool is allocated at startup, which won't work if that much memory is not available. Nov 2, 2015 at 10:54
  • Just to extend on "it will try to restart itself"--> mysqld will be killed and mysqld_safe the wrapper script will attempt to start the mysqld.
    – mysql_user
    Nov 2, 2015 at 12:21
  • Agreed. Oversimplification on my part. Nov 2, 2015 at 12:36
  • Simple and clear. That makes sense. I did find the message in the kernal log. Thank you.
    – Suanmeiguo
    Nov 2, 2015 at 15:47
  • So -- decrease innodb_buffer_pool_size.
    – Rick James
    Dec 5, 2015 at 0:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.