-1

On a server i have multiple rails apache + postgres apps and a mysql + php. The only PHP app is a wordpress. Except for wordpress everything runs fine.

Every 40-50 days, mysql stop to work. Here is the messages that are logged before a crash :

160408 19:20:31 [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.
160408 19:20:31 [Note] Plugin 'FEDERATED' is disabled.
160408 19:20:31 InnoDB: The InnoDB memory heap is disabled
160408 19:20:31 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160408 19:20:31 InnoDB: Compressed tables use zlib 1.2.3.4
160408 19:20:31 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
160408 19:20:31 InnoDB: Completed initialization of buffer pool
160408 19:20:31 InnoDB: Fatal error: cannot allocate memory for the buffer pool
160408 19:20:31 [ERROR] Plugin 'InnoDB' init function returned error.
160408 19:20:31 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160408 19:20:31 [ERROR] Unknown/unsupported storage engine: InnoDB
160408 19:20:31 [ERROR] Aborting

160408 19:20:31 [Note] /usr/sbin/mysqld: Shutdown complete

The error logs are empty except on the day of the crash, and this message is repeated 4 times starting at 19:20:25.

To restore wordpress, I just restart mysql and it works. I already increased the ram of the server in the past, it only increased the time before a crash. The number of visits on this wordpress are around 1000 a month.

How can i prevent mysql from crashing? Maybe it would be easier just to restart mysql every week?

EDIT : the VM has 1200 mo of ram, I may have some config problem related to memory, what should i do?

2
  • Looks like you ran out of memory to me.
    – user9517
    Apr 9, 2016 at 12:19
  • I think this should have been marked a duplicate of serverfault.com/q/560541/214507 which has a much more detailed answer.
    – kasperd
    Apr 10, 2016 at 12:26

1 Answer 1

0

seems to be a common error, perhaps InnoDB is configured to use more memory than you physically have, have you looked here:

https://stackoverflow.com/questions/12114746/mysqld-service-stops-once-a-day-on-ec2-server/12683951#12683951

Not the answer you're looking for? Browse other questions tagged .