2

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?

Community
  • 1
  • 1
Vitor Freitas
  • 3,550
  • 1
  • 24
  • 35
  • 1
    The most important message is the one right before all of these. It says `mysqld_safe: Number of processes running now: 0` ... and before that, nothing unusual. Correct? – Michael - sqlbot May 04 '16 at 00:08
  • 1
    The question is different but the answer is almost certainly the same as [this one on Stack Overflow](http://stackoverflow.com/a/31196872/1695906). I've also answered this on [Server Fault](http://serverfault.com/a/562476/153161)... and I've covered it [in this answer](http://dba.stackexchange.com/a/25083/11651) and [in this one, also](http://dba.stackexchange.com/a/25171/11651) on Database Administrators/Stack Exchange. – Michael - sqlbot May 04 '16 at 00:20
  • Thanks for your comments. It was very helpful. Actually the mysql was a symptom and not actually the real problem. Even though my website has a low traffic and should work on small vps, it ended up being a DOS attack. I followed the instructions in this site http://linuxaria.com/howto/how-to-verify-ddos-attack-with-netstat-command-on-linux-terminal and managed to mitigate the attack for now... – Vitor Freitas May 04 '16 at 07:11

0 Answers0