The problem started on a Amazon EC2 micro instance (1 GB ram), running a Wordpress website.
I have tried several solutions on the internet but failed to solve the problem.
Here is my MySQL error log:
160503 19:49:22 [Note] /usr/libexec/mysql55/mysqld (mysqld 5.5.46) starting as process 24829 ...
160503 19:49:22 [Note] Plugin 'FEDERATED' is disabled.
160503 19:49:22 InnoDB: The InnoDB memory heap is disabled
160503 19:49:22 InnoDB: Mutexes and rw_locks use GCC atomic builtins
160503 19:49:22 InnoDB: Compressed tables use zlib 1.2.8
160503 19:49:22 InnoDB: Using Linux native AIO
160503 19:49:25 InnoDB: Initializing buffer pool, size = 128.0M
InnoDB: mmap(137363456 bytes) failed; errno 12
160503 19:49:25 InnoDB: Completed initialization of buffer pool
160503 19:49:25 InnoDB: Fatal error: cannot allocate memory for the buffer pool
160503 19:49:25 [ERROR] Plugin 'InnoDB' init function returned error.
160503 19:49:25 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
160503 19:49:25 [ERROR] Unknown/unsupported storage engine: InnoDB
160503 19:49:25 [ERROR] Aborting
160503 19:49:27 [Note] /usr/libexec/mysql55/mysqld: Shutdown complete
160503 19:49:29 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
The error suggests my server doesn't have enough memory.
The error log is pretty similar to this one: Amazon EC2, mysql aborting start because InnoDB: mmap (x bytes) failed; errno 12
I tried to create the swap file, restarted the mysql server, and the result was that it only took 2~ min longer to crash.
I decided to create a medium instance with 4 GB RAM. I start the server and after clicking on 4~5 pages, the MySQL database crashes the same way, with the same error.
The last Wordpress (4.5.1) update changed the database, not sure if it might be related...
Any suggestions?