Tuesday, April 24, 2018

ubuntu - MySQL server keep on crashing



I'm facing a problem that i can't figure out,
for some reason my MySQL server keeps on crashing after 30-40minutes
the server load itself isn't too high, it's not even 0.5 (for 2 cpu machine)
i've been trying to snoop around in the error log /var/log/mysql/error.log but couldn't find any clue, but i'll be the first to admit i might be due to lack of knowledge.



the server is ubuntu 12.04 with basic lamp settings..
every time to server crash i have to manually restart mysql otherwise it will stay down.




this is the error log i have:



130623 15:09:18 [Note] Plugin 'FEDERATED' is disabled.
130623 15:09:18 InnoDB: The InnoDB memory heap is disabled
130623 15:09:18 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130623 15:09:18 InnoDB: Compressed tables use zlib 1.2.3.4
130623 15:09:18 InnoDB: Initializing buffer pool, size = 128.0M
130623 15:09:18 InnoDB: Completed initialization of buffer pool
130623 15:09:18 InnoDB: highest supported file format is Barracuda.

130623 15:09:18 InnoDB: Waiting for the background threads to start
130623 15:09:19 InnoDB: 5.5.31 started; log sequence number 2220260
130623 15:09:19 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
130623 15:09:19 [Note] - '127.0.0.1' resolves to '127.0.0.1';
130623 15:09:19 [Note] Server socket created on IP: '127.0.0.1'.
130623 15:09:19 [Note] Event Scheduler: Loaded 0 events
130623 15:09:19 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.5.31-0ubuntu0.12.04.2' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
130623 15:27:48 [Note] Plugin 'FEDERATED' is disabled.
130623 15:27:48 InnoDB: The InnoDB memory heap is disabled

130623 15:27:48 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130623 15:27:48 InnoDB: Compressed tables use zlib 1.2.3.4
130623 15:27:48 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
130623 15:27:48 InnoDB: Completed initialization of buffer pool
130623 15:27:48 InnoDB: Fatal error: cannot allocate memory for the buffer pool
130623 15:27:48 [ERROR] Plugin 'InnoDB' init function returned error.
130623 15:27:48 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
130623 15:27:48 [ERROR] Unknown/unsupported storage engine: InnoDB
130623 15:27:48 [ERROR] Aborting


130623 15:27:48 [Note] /usr/sbin/mysqld: Shutdown complete

130623 15:27:49 [Note] Plugin 'FEDERATED' is disabled.
130623 15:27:49 InnoDB: The InnoDB memory heap is disabled
130623 15:27:49 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130623 15:27:49 InnoDB: Compressed tables use zlib 1.2.3.4
130623 15:27:49 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
130623 15:27:49 InnoDB: Completed initialization of buffer pool

130623 15:27:49 InnoDB: Fatal error: cannot allocate memory for the buffer pool
130623 15:27:49 [ERROR] Plugin 'InnoDB' init function returned error.
130623 15:27:49 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
130623 15:27:49 [ERROR] Unknown/unsupported storage engine: InnoDB
130623 15:27:49 [ERROR] Aborting


does anyone see something i don't ?


Answer



Uhmm, it appears twice in your log file




InnoDB: Fatal error: cannot allocate memory for the buffer pool

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...