-1

I have a VPS, and today, the mysql service stopped, the error is

140821  2:35:21 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
140821  2:35:21 [Note] Plugin 'FEDERATED' is disabled.
140821  2:35:21 InnoDB: The InnoDB memory heap is disabled
140821  2:35:21 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140821  2:35:21 InnoDB: Compressed tables use zlib 1.2.8
140821  2:35:21 InnoDB: Using Linux native AIO
140821  2:35:21 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
140821  2:35:21 InnoDB: Completed initialization of buffer pool
140821  2:35:21 InnoDB: Fatal error: cannot allocate memory for the buffer pool
140821  2:35:21 [ERROR] Plugin 'InnoDB' init function returned error.
140821  2:35:21 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140821  2:35:21 [ERROR] Unknown/unsupported storage engine: InnoDB
140821  2:35:21 [ERROR] Aborting

140821  2:35:21 [Note] /usr/sbin/mysqld: Shutdown complete

140821  2:35:22 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
140821  2:35:22 [Note] Plugin 'FEDERATED' is disabled.
140821  2:35:22 InnoDB: The InnoDB memory heap is disabled
140821  2:35:22 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140821  2:35:22 InnoDB: Compressed tables use zlib 1.2.8
140821  2:35:22 InnoDB: Using Linux native AIO
140821  2:35:22 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
140821  2:35:22 InnoDB: Completed initialization of buffer pool
140821  2:35:22 InnoDB: Fatal error: cannot allocate memory for the buffer pool
140821  2:35:22 [ERROR] Plugin 'InnoDB' init function returned error.
140821  2:35:22 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
140821  2:35:22 [ERROR] Unknown/unsupported storage engine: InnoDB
140821  2:35:22 [ERROR] Aborting

140821  2:35:22 [Note] /usr/sbin/mysqld: Shutdown complete

Any explanation for this?

justyy
  • 5,831
  • 4
  • 40
  • 73
  • Out of memory exception it seems. – Nadeem_MK Aug 21 '14 at 09:42
  • but if i run sudo service mysql restart, it seems fine now... how to avoid this in the future? – justyy Aug 21 '14 at 09:43
  • Error will arise again in case not enough memory is available. You buffer pool siz is set to 128MB, maybe you can review it. – Nadeem_MK Aug 21 '14 at 09:45
  • ok... yes, my VPS RAM is 512M, where I can change the buffer pool sz? please? – justyy Aug 21 '14 at 09:46
  • possible duplicate of [Amazon EC2, mysql aborting start because InnoDB: mmap (x bytes) failed; errno 12](http://stackoverflow.com/questions/10284532/amazon-ec2-mysql-aborting-start-because-innodb-mmap-x-bytes-failed-errno-12) – Ulrich Thomas Gabor Aug 21 '14 at 09:52

1 Answers1

1

Error arises because of your memory allocation limit. It can be referred to as an Out of memory exception. It can arise again in case of high memory usage.

As you can see, the InnoDB buffer pool size is set to 128MB.

Change your buffer pool size to avoid the error again;

add this to your my.cnf

innodb_buffer_pool_size=1G

restart your mysql to make it effect

Nadeem_MK
  • 7,533
  • 7
  • 50
  • 61